Search/Fixup

* improve handling of invalid unicode sequences in urls (%xx).
   Page no longer breaks entirely, just misses the search term as the faulty string gets silently dropped.
 * don't perform searches if you don't have valid terms to search for
This commit is contained in:
Sarjuuk 2025-12-10 22:51:32 +01:00
parent f5d987a864
commit eb70065e0f
4 changed files with 22 additions and 14 deletions

View file

@ -981,7 +981,11 @@ $WH.g_getQueryString = function() {
};
$WH.g_parseQueryString = function(str) {
str = decodeURIComponent(str);
// aowow - set to catch invalid unicode escapes (%ff)
// str = decodeURIComponent(str);
try { str = decodeURIComponent(str); }
catch (e) { return {}; }
var words = str.split('&');
var params = {};