X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/1645330c8d4f6a13b8bcace4201ea82361fabe58..20944668da222b8510754fb4819b2b21e768840c:/searchlocal.js diff --git a/searchlocal.js b/searchlocal.js index 512f07b..6498e32 100644 --- a/searchlocal.js +++ b/searchlocal.js @@ -106,7 +106,7 @@ if (document.querySelector !== undefined) { else { // title text (case-insensitive unless caps in input) var match = function(row) { - return row.cells[1].textContent.match(query, /[A-Z]/.test(query) ? '' : 'i'); + return row.cells[1].textContent.match(new RegExp(query, /[A-Z]/.test(query) ? '' : 'i')); }; } filterrows(table, match, action || 'filter');