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:
parent
f5d987a864
commit
eb70065e0f
4 changed files with 22 additions and 14 deletions
|
|
@ -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 = {};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue