mirror of https://github.com/gorhill/uBlock.git
Do not use implicit regex flag when pattern is regex
As discussed with filter list volunteers.
This commit is contained in:
parent
15e3f763a3
commit
f68683f988
|
@ -114,7 +114,7 @@ function safeSelf() {
|
|||
return new RegExp(verbatim ? `^${reStr}$` : reStr, flags);
|
||||
}
|
||||
try {
|
||||
return new RegExp(match[1], match[2] || flags);
|
||||
return new RegExp(match[1], match[2] || undefined);
|
||||
}
|
||||
catch(ex) {
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ function replaceNodeTextFn(
|
|||
const rePattern = safe.patternToRegex(pattern, 'gms');
|
||||
const extraArgs = safe.getExtraArgs(Array.from(arguments), 3);
|
||||
const shouldLog = scriptletGlobals.has('canDebug') && extraArgs.log || 0;
|
||||
const reCondition = safe.patternToRegex(extraArgs.condition || '', 'gms');
|
||||
const reCondition = safe.patternToRegex(extraArgs.condition || '', 'ms');
|
||||
const stop = (takeRecord = true) => {
|
||||
if ( takeRecord ) {
|
||||
handleMutations(observer.takeRecords());
|
||||
|
|
Loading…
Reference in New Issue