Fix missing regex flags

Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/1005a8f/suddenly_my_filters_doesnt_work/j2htwof/
This commit is contained in:
Raymond Hill 2023-01-01 21:58:14 -05:00
parent e14cb609f3
commit dfe9d3a1da
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ const nonVisualElements = {
const regexFromString = (s, exact = false) => { const regexFromString = (s, exact = false) => {
if ( s === '' ) { return /^/; } if ( s === '' ) { return /^/; }
const match = /^\/(.+)\/([i]?)$/.exec(s); const match = /^\/(.+)\/([imu]*)$/.exec(s);
if ( match !== null ) { if ( match !== null ) {
return new RegExp(match[1], match[2] || undefined); return new RegExp(match[1], match[2] || undefined);
} }