-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space and plus sign sent in POST (is it really a 1.7.1 bug?) #153
Comments
I can see this happening in 1.7.1, but I get varying results in 1.7.2. Here's the same fiddle using 1.7.2 and scripty 1.9. In Chrome dev tools, your fiddle says the value is In Firefox dev tools, both fiddles say they're sending |
Actually, we modified 1.7.1 a long time ago to fix this issue, by removing this line: value = value.gsub(/%20/, '+'); * From this:
It was introduced in 1.7.1 and we've had no problems since removing it. |
previous lighthouse ticket #1726
by red-fern
I noticed it's a new feature in 1.7.1 that encode all spaces to +'s.
The problem here is that what if I have a string "I have a dog + a cat + a parrot". It would be sent to the server as "I+have+a+dog+++a+cat+++a+parrot". My sever side has no idea which one is a space and which is a genuine plus sign.
I have created a test page on jsfiddle:
http://jsfiddle.net/2HJqM
that uses the latest prototype (1.7.1) and latest scriptaculous (1.9). When you go to my test page, fireup Firebug and active the Net tab. Click RUN, then enter "a + b + c", then click on the latest POST request that pops up in the Net tab. You should see on the POST tab: value: a+++b+++c.
What we expect to receive in the form submission is: a+%2B+b+%2B+c
The text was updated successfully, but these errors were encountered: