SanfordWhiteman
Level 10 - Community Moderator

Re: Would you like to personalize your non-Marketo hosted thank you page?

Sant, all the JS here is broken.

The part that appends the parameter to the URL is broken in (at least) 2 major ways.

  1. It mangles people with hyphens in their names (or in any form field, whatever it is).
  2. It also creates a broken follow-up URL: you can't just add "?something" to the end of a URL that already has a query string.

The part that decodes the URL uses a broken regex that is not properly anchored to the query string because it doesn't make use of the Location#search property.

These must be rewritten with awareness of how URLs and URL-encoding work.