kibu-australia / pushy

Clojurescript library for quick and easy HTML5 pushState
Eclipse Public License 1.0
223 stars 28 forks source link

When following link with URL-encoded backslash, backslash appears unencoded in the address bar #36

Open OlegTheCat opened 6 years ago

OlegTheCat commented 6 years ago

Consider the next link: http://localhost:3000/%5C, where %5C is URL encoding of backslash. When following such link it appears as http://localhost:3000// in browser's address bar.

It seems to happen because pushy uses goog.Uri for parsing URLs and, for some reason, .getPath returns decoded URLs (doc).

Also, the resulting URL contains the slash and not a backslash, because browsers seem to replace all backslashes with slashed by default.