Skip to content
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

filters that start with || and end with | #1669

Closed
IsraeliUser opened this issue May 29, 2016 · 2 comments
Closed

filters that start with || and end with | #1669

IsraeliUser opened this issue May 29, 2016 · 2 comments
Labels

Comments

@IsraeliUser
Copy link

uBO ignores the || at the beginning or the | at the end.
For example: let's say you want to block the English Wikipedia logo.
https://en.wikipedia.org/static/images/project-logos/enwiki.png

Use the filter: ||en.wikipedia.org/static/images/project-logos/enwiki.png|
uBO ignores the || at the beginning.

Use the filter:||en.wikipedia.org/static/images/*/enwiki.png|
uBO ignores the | at the end.

Use the filter: ||en.wikipedia.org/static/images/*/enwiki.pn| (without the g at the end)
uBO blocks the logo, although it should not.

uBlock Origin v1.7.0, Firefox 46.0.1 64 bit,

@lewisje
Copy link

lewisje commented Jun 9, 2016

It turns out that this creative interpretation of ABP syntax also leads these two filters from the EasyList Adware Filters supplementary list to be considered invalid:

||*-a.akamaihd.net/a24/gsd.html?$third-party
||*-a.akamaihd.net/a24/scripts/gsd.js?$third-party

It ignores both the initial || and the * after that, even though this should mean "any subdomain of akamaihd.net that ends with -a, and any subdomain of that".

@gorhill
Copy link
Owner

gorhill commented Jun 27, 2016

this creative interpretation of ABP syntax also leads these two filters [...]

It was not an interpretation issue, it was an implementation one. uBO can already deal with these filters, it's just that the wrong code path was taken for that specific case. I missed the issue re. ||*-a.akamaihd.net/... because it's a different issue that the one reported by OP.

@gorhill gorhill closed this as completed in c956b93 Oct 4, 2016
gorhill added a commit that referenced this issue Oct 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants