mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 22:48:55 +08:00

There was existing logic for this, but it was broken because the values were being run through `encodeURI` before checking its type. This commit takes the opportunity to modernise the function to use `URLSearchParams`, which means we no longer need to handle encoding/joining strings manually. Co-authored-by: Jarek Radosz <jradosz@gmail.com>