From f544f1d7860235fa4d86348e66deb3e1d5f0634a Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 7 Dec 2010 21:35:06 +0100 Subject: [PATCH 1/1] browser: prevent invalid test of column class Script failed for non-css queries, making complex regexes and comparisons like "<50" impossible. --- searchlocal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searchlocal.js b/searchlocal.js index eb284b7..99bffb2 100644 --- a/searchlocal.js +++ b/searchlocal.js @@ -67,7 +67,7 @@ function filtertable(query, action) { query = match[2]; } - if (document.querySelector('.b-a-'+query)) { + if (/^[a-z_]+$/.test(query) && document.querySelector('.b-a-'+query)) { // column if class b-a-* exists var match = function(th) { return new RegExp('-'+query+'\\b').test(th.className); -- 2.30.0