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

Why we need to have two filters for lowercase/capital letters? #408

Closed
smed79 opened this issue Jun 26, 2015 · 2 comments
Closed

Why we need to have two filters for lowercase/capital letters? #408

smed79 opened this issue Jun 26, 2015 · 2 comments

Comments

@smed79
Copy link

smed79 commented Jun 26, 2015

Hi,
for an adblocker i like to know what is the difference between two urls written in lowercase or capital letters?

for example this filters ##a[href^="http://www.FriendlyDuck.com/AF_"] found on easylist can't block banners link to: FriendlyDuck.Com/AF_

why we need to have two filters for just one lowercase/capital letter C?

##a[href^="http://www.FriendlyDuck.com/AF_"]
##a[href^="http://www.FriendlyDuck.Com/AF_"]

test: http://tinyurl.com/warez-world
Thanks!

@gorhill
Copy link
Owner

gorhill commented Jun 26, 2015

why we need to have two filters for just one lowercase/capital letter C?

Cosmetic filters must be valid CSS Selectors, and so are bound by the semantic of CSS Selectors. Attribute values are case-sensitive.

To not confuse with network filters, which are case-insensitive.

@gorhill gorhill closed this as completed Jun 26, 2015
@gorhill
Copy link
Owner

gorhill commented Jun 26, 2015

By the way, you test case can be solved using a better filter:

###headerinfo-right-a

There can be only one id per element, so case sensitivity is not an issue when basing the cosmetic filter on the id.

Or you could also:

##a[href^="http://www.FriendlyDuck."]

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

2 participants