12-24-2019
12:05 PM
12-24-2019
12:05 PM
Sant, all the JS here is broken.
The part that appends the parameter to the URL is broken in (at least) 2 major ways.
- It mangles people with hyphens in their names (or in any form field, whatever it is).
- 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.