Filter Rule: case insensitiv attribute value

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey

Filter Rule: case insensitiv attribute value

Postby Tomkeen » Tue Jan 14, 2020 12:34 pm

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 6:15 am, edited 1 time in total.
Tomkeen
 
Posts: 6
Joined: Thu Nov 07, 2019 12:15 pm

Re: Filter Rule: case insensitiv attribute value

Postby greiner » Thu Jan 16, 2020 1:38 pm

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.
User avatar
greiner
ABP Developer
 
Posts: 765
Joined: Mon Sep 03, 2012 5:29 pm
Location: Cologne, Germany


Return to Adblock Plus for Firefox support

Who is online

Users browsing this forum: No registered users and 7 guests