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 May 25, 2015
1 parent d246e75 commit 509ea51
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 @@ -182,6 +182,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 509ea51

Please sign in to comment.