mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-19 09:22:40 +02:00
make sure a single \/ is not treated as a valid regex
This commit is contained in:
parent
24afff491d
commit
94dd2b3d86
@ -1506,7 +1506,7 @@ FilterParser.prototype.parse = function(s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// regex?
|
// regex?
|
||||||
if ( s.charAt(0) === '/' && s.slice(-1) === '/' ) {
|
if ( s.charAt(0) === '/' && s.slice(-1) === '/' && s.lenght > 2 ) {
|
||||||
this.isRegex = true;
|
this.isRegex = true;
|
||||||
this.f = s.slice(1, -1);
|
this.f = s.slice(1, -1);
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user