-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single invalid style filter disables all cosmetic filtering on the page #2170
Comments
Looks like Chrome, Safari and Firefox bug: https://output.jsbin.com/tiqabalije So uBo may need implement abstraction with Stylelint like in Stylus. Or move these css to end of (Bug free are only legacy IE 5 (from 1999-2001) and Safari 5 (from 2012) and maybe similar old FX/Chromium.) |
I'm redirected to |
IMO possible rewrite to example.org/com. example.*##body:style(overflow: scroll !important;padding: var(--scroll !important;)
example.*##body *
Or you mean hack on jsbin? |
Maybe geo-dependent then. I'm accessing from Japan. Or as @krystian3w suggested test on another site. |
Definitely EU locked page. |
I worked a bit on this yesterday. The crux of the problem is that the browsers silently drop the bad CSS property and everything that follows in the crafted stylesheet. No error is emitted. The solution I found was to inject the CSS property(ies) to test as a stylesheet instead of as a single CSS rule, and then test whether the resulting stylesheet has the number of expected CSS rules (2). I did use |
Related issue: - uBlockOrigin/uBlock-issues#2170
@gorhill style is leaking into the Dashboard??? |
Oops. I assumed this line would work:
|
Related commit: - 19298fe Related issue: - uBlockOrigin/uBlock-issues#2170
Just found out that cosmetic filters with pseudo elements are deemed invalid in Firefox:
Is a perfectly valid filter, but it's being rejected in Firefox, while it passes in Chromium. It seems Firefox's implementation of CSSRule.selectorText is faulty and causing this. There was measurable performance gain in the parser with using CSSRule.selectorText approach, but I will have to fall back to using the generate-a-whole-stylesheet approach. |
But pseudo elements rules have actually been working on Firefox. For example, on
the right sidebar lacks the top edge. Adding |
But this looks like use pseudo-elements in picker or very generic in file/my filters pane like use DandelionSprout: #464 |
Yes I know, I meant my latest commit here is causing this undue invalidation. |
Regression from: - 97befd1 Related issue: - uBlockOrigin/uBlock-issues#2170
This comment was marked as off-topic.
This comment was marked as off-topic.
Need more specific repro steps. What are those lines? Where do you split in two lines? Which characters to delete? |
This comment was marked as off-topic.
This comment was marked as off-topic.
@gorhill @Yuki2718 @gwarser Still I can reddish text in uBo interface by:
But this may not longer related with fixes added to this issue. It looks uBo tries mark duplicated selector in filter but fail and colorize sometimes real Non HTML5 tags like |
Prerequisites
I tried to reproduce the issue when...
Description
As the title says. See Steps to reproduce.
A specific URL where the issue occurs
www.backcountry.com
Steps to Reproduce
to My filters - note the second rule lacks an close parenthesis for var but neither picker or assets viewer marks as invalid. Also enable EasyList Cookie to see the effect.
www.backcountry.com##body:style(overflow: auto !important;padding: var(--chakra-space-0) !important;)
) everything works as expected1.Expected behavior
uBO ignores the style filter and other elements are hidden.
Actual behavior
All cosmetic filters are not applied yet logged.
uBlock Origin version
1.43.0/1.43.1b3
Browser name and version
Firefox 102.0.1
Operating System and version
Windows 10
The text was updated successfully, but these errors were encountered: