
Loading…
Unable to transfer custom filters from ABP to uBlock; strange filter behavior #1417
Just in case it's relevant, I should mention that uBlock doesn't support the $document option for whitelist rules; all simple domain-based whitelists with that option should instead go into the Whitelists section, and I don't know what to do for more complicated whitelists with $document (like @@||github.com/chrisaljoudi/$document, which targets a path component).
Now there are two, bit-to-bit identical lines in My FiIters, and if I delete the one added by uBlock, the filter won't work.
@leafcutterant Any reason why you don't actually provide any example of filters which you say did not work?
@lewisje - I got along with whitelistst, this here is a problem (?) with "blacklisting", My Filters. And no special options here.
@gorhill - I apologize, this might have been an overstatement, it is this one item which stands out (I can't even test the rest because they are so old the content doesn't exist).
Here's the relevant part form my list:
||fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
||https://fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
*/HP0KTsfMAum.png
! 5/30/2015, 12:21:18 PM https://www.facebook.com/
||fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
The first 3 came from ABP, the 4th is created with uBlock. If I delete the 4th, the item reappears.
||https://fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png is not a valid filter. The double-pipe || means "anchor to within hostname", while you try to use it as "anchor to start of URL". The single pipe | must be used for start of URL, i.e. |https://fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png.
The first 3 came from ABP, the 4th is created with uBlock. If I delete the 4th, the item reappears
I wonder if there could be invisible Unicode characters in what you pasted in uBlock from ABP. Delete all those 3 filters from uBlock and replace with this:
||fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
|https://fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
*/HP0KTsfMAum.png
@leafcutterant Please do this:
- Copy those filters from your list (ctrl-c).
- Paste them here in a comment.
- Do not edit them further: I want to see exactly how they appear in the text area
-
Just add four spaces before each line. This will render the result with
code style. - Then click Comment.
As you asked, here they are. I copied and pasted the relevant lines of My Filters (I included the empty line added by uBlock before the comment).
||fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
||https://fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
*/HP0KTsfMAum.png
! 5/30/2015, 12:21:18 PM https://www.facebook.com/lists/10200638305480416
||fbstatic-a.akamaihd.net/rsrc.php/v2/yw/r/HP0KTsfMAum.png
@leafcutterant All looks fine to me. You have a URL where I can see if I get the same result as you? (hopefully no need to sign in, I don't have a facebook account).
@gorhill I fear you only have the URL of the image, since the item itself is tied to facebook friend lists. (Kudos for being off facebook, though.) Something I noticed is that (with my present filter list, as posted above) loading the item in a site context doesn't result in blocking, but loading just the image from the URL does (it won't appear). I suspect this will be some syntax issue, I'm just unsure, being totally new to uBlock.
What does the request log says about the item HP0KTsfMAum.png?
@leafcutterant Sorry, I should have be more clear, I meant uBlock's request logger.
So you have an answer, there is an exception filter overriding your filter. This filter comes from Fanboy Anti-Facebook.
Wow. You are right. I have no idea why the Anti-ThirdpartySocial list has whitelisted items in it but that's the culprit. I was able to both keep the list and enforce my block filter via the ^$important option.
Thank you for the investigative effort and the patience with my novice issues.




I have a bunch of manually created filters in ABP and wanted to transfer them to uBlock upon switching. I can select all in ABP, copy and then insert into uBlock's My filters; but uBlock kept behaving like it's not there, the content was not blocked. Then I added one of the the same specific elements via the right-click content menu item, and behold, the item was gone.
Now there are two, bit-to-bit identical lines in My FiIters, and if I delete the one added by uBlock, the filter won't work.
How is this possible? What am I missing? uBlock is said to support the ABP syntax and the strings are the same.