Improved hash url docoding

This commit is contained in:
Borys Levytskyi
2015-04-12 22:14:34 +03:00
parent d9e2173e5e
commit 4aaf9d0272

View File

@@ -9,7 +9,7 @@
app.set('hash', function () {
return {
encodeHash: function(string) {
return encodeURI(string.trim()).replace(/\s/g,',');
return encodeURI(string.trim().replace(/\s/g,','));
},
decodeHash: function(hashValue) {
return decodeURI(hashValue).replace(/^\#/, '').replace(/,/g,' ');