Skip to content

Commit

Permalink
Adding in sanitation for URLs with more than one slash in it: emberjs…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston committed Jul 17, 2015
1 parent 693a8e9 commit b3563ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ember-routing/lib/location/history_location.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ export default EmberObject.extend({
baseURL = baseURL.replace(/\/$/, '');
}

// Sanitize double slashes in URL
url = url.replace(/[/]{2,}/, '/');

return baseURL + rootURL + url;
},

Expand Down

0 comments on commit b3563ac

Please sign in to comment.