iron-meteor / iron-router

A client and server side router designed specifically for Meteor.
MIT License
1.98k stars 413 forks source link

Params - Query - undefined instead of string #1571

Closed escaroda closed 7 years ago

escaroda commented 7 years ago

I'm trying to pass parameter through query but Iron Router don't see it and get undefined

Here is this string: one two three (12,34) = 360 +2%+250 After encodeURIComponent() it looks like this:

one%20two%20three%20(12%2C34)%20%3D%20360%20%2B2%25%2B250

You can test it easily. Open any meteor project with iron router and add to link:

?notes=one%20two%20three%20(12%2C34)%20%3D%20360%20%2B2%25%2B250

then inside console run Router.current().getParams() and you'll see query.notes = undefined

escaroda commented 7 years ago

Any idea guys?

chrisbutler commented 7 years ago

@escaroda it's choking on %25 which is the encoded '%' character

i found this existing issue: https://github.com/iron-meteor/iron-router/issues/1254

testing out a fix now