You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're missing user input escaping before construct the RegExp. Actually if you input a ')' in filter input it throws a SyntaxError: Invalid regular expression: /abc)/: Unmatched ')'
var filterInput = $.trim(dualListbox.elements['filterInput'+selectIndex].val());
filterInput = filterInput.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
var regex = new RegExp(filterInput, 'gi')
Cheers
The text was updated successfully, but these errors were encountered:
Cyrille37
changed the title
[bug] Missing escape for filterInput RegExp
[bug] Missing escape for filterInput RegExp (v3.0.9)
May 7, 2020
Cyrille37
added a commit
to Cyrille37/bootstrap-duallistbox
that referenced
this issue
May 7, 2020
Hi,
You're missing user input escaping before construct the RegExp. Actually if you input a ')' in filter input it throws a
SyntaxError: Invalid regular expression: /abc)/: Unmatched ')'
Cheers
The text was updated successfully, but these errors were encountered: