Closed geekyme closed 8 years ago
@lingyan Could this be happening within routr?
routr strips off query string and hash before trying to match a url to routes: https://github.com/yahoo/routr/blob/master/lib/router.js#L74-L94
@geekyme Does the stack trace show which lib/line throws the error?
Unfortunately no, there was no stack trace. :(
On 28 Jul 2015, at 6:18 am, lingyan notifications@github.com wrote:
routr strips off query string and hash before trying to match a url to routes: https://github.com/yahoo/routr/blob/master/lib/router.js#L74-L94 https://github.com/yahoo/routr/blob/master/lib/router.js#L74-L94 @geekyme https://github.com/geekyme Does the stack trace show which lib/line throws the error?
— Reply to this email directly or view it on GitHub https://github.com/yahoo/fluxible-router/issues/71#issuecomment-125363630.
Following up on this, got the same syntax error triggering when a user access the route with query parameter ?query=%5BD.Y.O.N%5DPopular+Taiwan+Teeth+Whitening+Spa%21%7B+
This error actually comes from https://github.com/yahoo/intl-messageformat when there is escaped '\'
I hit this error on a totally different use case (directly using IntlMessageFormat) and was trying to find a solution when I stumbled up on this issue. Might be related.
When a user navigates to a route with query parameter ending with a backslash \, the above syntax error will be thrown.
eg.
/search?query=test\
will throw the error.This will happen both on the front end and backend on an isomorphic app where routes are shared. It appears that it is happening on the navigateAction call.