JacksonRiver/springboard_modules — pull request #267 by rlnorthcutt (2013-05-06 22:47:12+00:00)
Title: Fixes a jQuery error when % is in the query string. This 'encodes' the s...

...tring first to convert the % to %25 so it doesn't break the decodeURI() function.

In reference to jr-ifaw ticket #1190.

We occasionally get a query string for pre-populating donation forms where the mailing id doesn't parse correctly and it output by the token: mailid=%%MAILING_ID%%
SilverPop is unable to fix.

The problem is that when we parse the string with jQuery to pull out the market source, we are using decodeURIComponent() which dies when it hits the %%. My proposed solution is to first use encode URI() on the variable (which converts % to %25), and then decode it.

This works on my tests and is on the staging site above. I don't think it will create any other problems, or at least I am not seeing any, and its a pretty simple fix.