Mikhus/domurl

Hash is encoded but...

Opened this issue · 1 comments

I dont know if it's the right behavior. I'm actually using backbone and the way to describe routes (like many front-end framework) is with hash like foo/1 which become foo%2F1 when using domurl to manipulate query parameters.

Same for me with Backbone
I ended up adding the hash manually
e.g. to add a qs param :

    var u  = new Url(url);
    u.query[parameterName] = parameterValue;
    var hash = u.hash;
    u.hash = '';
    var result = '' + u + (hash ? '#' + hash : '');