-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issues with route.js in jmvc-3.2.1 #102
Comments
The reason you're having an issue with base64 is that |
@polgfred, thanks for your reply.. I am not setting the URL from the code. But in my tests, i tried from firebug "$.route.attrs({var1:'aaa=='});" this statement has changed the $.route.data._data -> var1 to "aaa==" Please correct me if i am wrong! BTW: Please clarify me about the 2nd issue also! (reg: setting the URL thing..) -Thanks! |
If all of your hash changes are handled through the $.route.attr/attrs methods, it's handled automatically, but if you're setting the hash elsewhere you need to use |
Hmm.. it is not possible to change the server side services :( But I couldnt find a solution for the second issue! (mentioned in my question, above) |
Can anyone help me, please? :( |
What's needed is a greedy url. So you can write: $.route('/*var1'); The problem should be fixed in the latest. |
I've noticed that window.location.hash gives something slightly different that window.location.href ... this might be the trick that helps ... |
This is is fixed now in CanJS: https://github.com/jupiterjs/canjs/blob/master/route/route.js#L382 I read from the href, not the hash (which is already decoded) |
Hi,
I am facing few issues while working with $.route functionality. (jquery/dom/route/route.js)
(1)while getting data from url and (2) while setting the url
Say, url is http://localhost/test/#!/c3VyeWFwYXZhbg==
Now, the $.route.data._data is having the key 'var1' with value "c3VyeWFwYXZhbg" (instead of "c3VyeWFwYXZhbg==")
Why these characters are being stripped?
But in the URL, if any of the values (val1 or val2) is having special characters like ". , /= etc", its not showing up.
I mean, for eg: var1 is given as "aaaa" and var2 is given as "bbbb/cccc"
the url is comming up as "#!aaaa/bbbb" (cccc in var2 is missing).
[ expected result: '#!aaaa/bbbb%2Fcccc' ]
This problem exists even in that example "jquery/dom/route/route.html"
Hope you understand my problems!
There may be something wrong with the escaping in route.js
Could anyone please help me.
My project was stuck-up abruptly due to these errors! and it has stopped the project delivery :(
-Thanks!
The text was updated successfully, but these errors were encountered: