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

Static filter anchor malfunction. #1665

Closed
scratchyleet opened this issue May 28, 2016 · 3 comments
Closed

Static filter anchor malfunction. #1665

scratchyleet opened this issue May 28, 2016 · 3 comments

Comments

@scratchyleet
Copy link

scratchyleet commented May 28, 2016

Requirements:

  • Firefox 46.0.1.
  • uBlock Origin 1.7.0.

Reproducing steps:

  • Set uBlock Origin's static filter to rules below:
||*$image
@@||avatars1.githubusercontent.com/u/12792253^$image,domain=github.com
||*$image
@@||avatars1.githubusercontent.com/u/12792253?^$image,domain=github.com

Is that an expected behavior?

Additional information:
It seems when anchor in a static filter rule is stated after digits or letters then everything after anchor is passed. But if anchor is stated after special characters (e.g.: "?", "=") then everything after anchor is not passed. Probably i do not completely understand anchor's role in uBlock's static filter. What does it expected to do?

Good luck fixing that.

@gwarser
Copy link
Contributor

gwarser commented May 28, 2016

Works as expected https://adblockplus.org/en/filters#separators

@scratchyleet
Copy link
Author

Works as expected https://adblockplus.org/en/filters#separators

Then it is not an issue. My apologies.

Interesting though. Is there any difference between static and dynamic filters?
I have tended to think that dynamic filter allows string+anything after that. But now i see that static filter acts the same? Shouldn't it be an address explicit by default?

For example:
I would like to allow: https://avatars1.githubusercontent.com/u/12792253
But not: https://avatars1.githubusercontent.com/u/12792253?v=3&s=40
If i place a rule:
@@||https://avatars1.githubusercontent.com/u/12792253
in a static filter then https://avatars1.githubusercontent.com/u/12792253?v=3&s=40 would be also allowed.
Though i have found a solution in the given link above:
@@||https://avatars1.githubusercontent.com/u/12792253|
Is that correct?

Also i would like to ask about pipes ("|", "||").
What is the difference between:

|https://avatars1.githubusercontent.com
||https://avatars1.githubusercontent.com

I couldn't understand that part from the given resource.

And i guess double pipes are not used in the end of an address? E.g.:
https://avatars1.githubusercontent.com||

@gorhill
Copy link
Owner

gorhill commented May 28, 2016

There is more details here: https://adblockplus.org/filter-cheatsheet.

@gorhill gorhill closed this as completed May 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants