We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
|
1 parent 6f8edc3 commit bb34a4bCopy full SHA for bb34a4b
src/js/static-filtering-parser.js
@@ -2239,7 +2239,10 @@ export class AstFilterParser {
2239
const regex = before.startsWith('[$domain=/')
2240
? `${before.slice(9, -1)}`
2241
: before;
2242
- const source = this.normalizeRegexPattern(regex);
+ // TODO: Remove unescaping of `|` once AdGuard filters no longer unduly
2243
+ // escape. In the mean time, if a literal `|` is needed in a path-based
2244
+ // regex, the solution is to use `\x7C` instead of `|`.
2245
+ const source = this.normalizeRegexPattern(regex.replace(/\\\|/g, '|'));
2246
if ( source === '' ) { return ''; }
2247
const after = `/${source}/`;
2248
if ( after === before ) { return; }
0 commit comments