Skip to content
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

% Isn't url decoded correctly #1254

Closed
d0liver opened this issue Feb 25, 2015 · 6 comments
Closed

% Isn't url decoded correctly #1254

d0liver opened this issue Feb 25, 2015 · 6 comments

Comments

@d0liver
Copy link

d0liver commented Feb 25, 2015

Specifically, if http://somewhere/path is a route then curl http://somewhere/path?q=%25 will cause this.params.query.q to be undefined instead of '%'.

@RodMagnuson
Copy link

I see this as well

@fongandrew
Copy link

Also running into this error. The percent symbol appears to be decoded twice. I've set up a simple repro on Meteorpad: http://meteorpad.com/pad/7ArsrxRXhhvux73tE/Iron:Router%20Query%20Param%20Test

If you submit the form in the Meteorpad with a value of Bob%20Loblaw, you get a querystring encoding of Bob%2520Loblaw. Expected behavior would be for Iron:Router to decode this back into Bob%20Loblaw. Instead, Iron:Router appears to process the string twice and returns Bob Loblaw.

@winstoncse
Copy link

+1

@leinaD-natipaC
Copy link

I have the same undefined problem. When my route has something like "etc/?someParam=otilde%F3" the entire params.query becomes undefined, breaking everything that ever uses the link's parameters. How is this issue a year old?

@saginadir
Copy link

saginadir commented May 19, 2016

+1

A solution until this is fixed:

use:
this.request.query - decoded once

Instead of:
this.params.query - decoded twice and returns undefined on encoded params

@chrisbutler
Copy link
Contributor

chrisbutler commented Feb 12, 2017

@d0liver @RodMagnuson @fongandrew @winstoncse @leinaD-natipaC @saginadir fixed in 1.1.2

chrisbutler added a commit that referenced this issue Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants