Filter Rule: case insensitiv attribute value

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
Tomkeen
Posts: 6
Joined: Thu Nov 07, 2019 11:15 am

Filter Rule: case insensitiv attribute value

Post by Tomkeen »

Hello everyone,,
In CSS rules the value of an attribute is case sensitive.

My question:

Is it possible to create filter rules which realize a case insensitivity?

Example:

example.tld##element[attr="/Foo"]
example.tld##element[attr="/foo"]
example.tld##element[attr="/fOo"]
...

I would love to match all those elements with one single line:
example.tld##element[attr="/foo"]

Are there any "options" to realize such a filter rule?


Thanks for your help.
Last edited by Tomkeen on Fri Jan 17, 2020 5:15 am, edited 1 time in total.
User avatar
greiner
ABP Developer
Posts: 899
Joined: Mon Sep 03, 2012 5:29 pm
Location: Cologne, Germany

Re: Filter Rule: case insensitiv attribute value

Post by greiner »

Apart from some additions, filters can only be written using CSS selectors that are supported by the browser which Adblock Plus is running in. That means that if modern browsers don't support a certain selector, filters can't use it either.

In this particular case, I found the feature you're searching for in the CSS Selectors Level 4 standard which is still a working draft and therefore still subject to change. According to MDN however, it's already supported by most browsers.
Post Reply