X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/1645330c8d4f6a13b8bcace4201ea82361fabe58..c9b4f2f2a059af8bc0dcf7909c7677c1cac258e3:/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');