Semantic definition of RegEx defined target #50
MasterInQuestion
started this conversation in
uBlock Origin
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[ Draft Unfinished ]
Up: https://old.reddit.com/r/uBlockOrigin/comments/1kq8tdu/bug_any_of_the_2_rules_may_cause_cosmetic_filters/?sort=old#mt5qo45
“
/b\.co/##*:style( color: red !important; )
.
Would turn "github.com" bleeding red...
(unlike what "
b.co## ...
" did)”“
/b\.co/##
; is a regular expression.
It will match anything in the hostname: "github.com"
[ ^
Precisely, ~~
everything~~ in the "location.href".Stripped protocol (e.g. "http://") for the "##" alike variants. (HTML-specific filters, a.k.a. "cosmetic")
Else (generic, "network") full URL.
Also note the RegEx case sensitivity settings are also different:
Generic filters default case-insensitive; others case-sensitive.
E.g.
/^httpS:\/\/exaMple\.Com\/https:\/\/gitHub\.com\/$/$doc
]b.co##
; will match exactly: "b.co" or "www.b.co"”
The URL can be actually alike:
https://example.com/https://github.com/
/https:
./github.com/
[ ^ Effective path "/https:/github.com/" at "example.com". ]
To address the problem ...
Beta Was this translation helpful? Give feedback.
All reactions