git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2ca80f
)
browser: prevent invalid test of column class
author
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 7 Dec 2010 20:35:06 +0000
(21:35 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 15 Dec 2010 21:40:44 +0000
(22:40 +0100)
Script failed for non-css queries, making complex regexes and comparisons
like "<50" impossible.
searchlocal.js
patch
|
blob
|
history
diff --git
a/searchlocal.js
b/searchlocal.js
index eb284b7a53d3ffe53736e5b84079672364d9f2d8..99bffb2d272372139e08561cb4c7822281aeae69 100644
(file)
--- 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);