-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
HTML Filter with ^ has no effect #3562
Comments
Thanks for reporting. There is an error in the regex I use to detect content type -- the error occurs when the document type is However, once I fixed the error, this uncovered another issue with the HTML filtering code which occurrs as a result of parsing the XHTML document served at |
That's what I call a quick fix. Thanks so much! And also thanks for pointing out wrong mime type for our company website. Guess I have some fixing to do as well. |
Your mime type is fine, it's uBO which was not using it to pass to DOMParser, I was passing a hard coded |
@gorhill problem is not fixed on youtube.com and duckduckgo.com |
I am not aware of any issue with HTML filtering on youtube.com and duckduckgo.com. If you uncovered an issue with uBO, open a new issue with all the needed details for others to reproduce as required. Also, be sure to read the documentation before so that you understand what exactly is HTML filtering. |
Based on the documentation for html-filters, the only syntactical difference to the cosmetic filters seems to be the ^-prefix.
It is my understanding that a match would remove the element specified from the html before the stream hits the rendering engine.
Yet, when adding a such a filter it does not seem to have any effect?
When omitting the ^-prefix, the element gets hidden as expected, so I assume the selector itself to be correct.
I'm not sure whether I'm doing something wrong and it's behaving as expected or this is a bug.
I tried this with my company website: https://thephp.cc/welcome with the following simple filter to hide respectively remove the Home link from the top menu bar.
The cosmetic filter
thephp.cc##a:has-text(Home)
works as expected, the a element gets hidden but remains in the dom. The html filterthephp.cc##^a:has-text(Home)
though has no effect.The text was updated successfully, but these errors were encountered: