Bug: Non-ascii URLs get mangled after updating interesting/ignored tags

asked 2012-06-17 03:18:15 -0600

Basel Shishani gravatar image

updated 2012-06-17 04:08:44 -0600

There is buggy behavior when updating the tags in the interesting/ignored tags on the main page:

If the window URL contains URL encoded non ascii chars (as in internationalized url's where the 'question' segment has been translated) then the refreshed URL after the Ajax call would get mangled (the non-ascii segment goes through incorrect encode/decode it seems). Also, the newly added/removed tags would not show immediately on the page, but would show on subsequent page updates.

This seems to be an issue not with Askbot but with the History.js library - when calling History.pushState.

I modified the code in the 'livesearch.js' file to call history.pushState directly (notice the lower case 'h') bypassing the History.js library, and the issue went away as far as I can tell. (Of course by doing so we lose the supposed benifit of History.js)

I provide more details in my recent StackOverflow posting, so check it there please.

edit retag flag offensive close merge delete