#61 new
Joe Gornick

Fix String#toQueryParams to support params with query params.

Reported by Joe Gornick | October 7th, 2009 @ 04:03 PM

With the current implementation of toQueryParams, if you have a URL like http://site.com?param1=http://site2.com?site2param1=value, it will parse the string incorrectly. In that case, you would expect an object containing param1: http://site2.com?site2param1=value.

I've made the non-Fuse fix here: https://gist.github.com/8ceba659dcd096be2abc

Notice how we split on the ?, but rejoin the string for everything after the first ? in the string.

I also remove the hashes per pair instead of globally, since there could be a hash in the query param URL like http://site.com?param1=http://site2.com?site2param1=value#site2hash&param2=value2#hash.

Yes, I understand that the URL's in the params should be URL encoded, but I've seen a lot of implementations when they are not.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

JavaScript frameworks share similar features and functionality such as DOM manipulation, event registration, and CSS selector engines. FuseJS attempts to incorporate the strengths of these frameworks into one stable, efficient, and optimized core JavaScript framework.

People watching this ticket

Pages