SC.Route argument parsing broken by percent encoded & on Firefox 3
Reported by Darryl Fuller | July 24th, 2008 @ 10:58 AM | in REL 0.9.21
On firefox 3, if there is a percent encode & character in an argument ( %26 ), it is interpreted as an argument delimiter, as if it was not percent encoded.
The root of this problem is that on Firefox 3 (but not on IE or Safari) location.hash decodes the percent encoding so that when SC.Route does split("&"), it splits on it.
The offending code seems to be in route.js, in _checkWindowLocation:
Comments and changes to this ticket
-
Charles Jolley August 9th, 2008 @ 07:26 PM
- → Milestone changed from to Unscheduled
- → State changed from new to open
Any idea how we can fix this? It seems that if we can't differentiate between encoded values and real & in FF we don't have an alternate course of action.
-

Darryl Fuller August 12th, 2008 @ 08:48 AM
You can differentiate between the encoded values and the real & by using location rather than location.hash. In location, the values have not been translated from the encoded value to the &. This means that you'll have to parse the raw location for the # too, instead of using location.hash.
-

Erich Ocean (onitunes) September 30th, 2008 @ 04:18 AM
- → Milestone changed from Unscheduled to REL 0.9.21
- → Assigned user changed from to Erich Ocean (onitunes)
-

Erich Ocean (onitunes) November 8th, 2008 @ 09:27 AM
- → Assigned user cleared.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
SproutCore: JavaScript Application Framework
Source available from github
The Git repository resides at http://github.com/sproutit
Check out the current development trunk with:
git clone git://github.com/sproutit/sproutcore.git
Creating a bug report
When creating a bug report, be sure to include as much relevant information as possible. Post the code sample that causes the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.
Submitting Patches
Resist adding new tags, use the ones in the tag cloud already. If you are submitting a patch or a pull request from a fork, tag the ticket as a "patch". If you are submitting a new feature enhancement, tag it as "enhancement". If you are submitting a fix for a bug, tag it as "fix".
Thanks!
We're glad you're contributing. Feel free to drop by the Google Group as well to let us know you are involved.
