AdguardTeam / urlfilter

AdGuard content blocking library in golang
GNU General Public License v3.0
101 stars 20 forks source link

Some Comments Break Filtering #9

Open ameshkov opened 3 years ago

ameshkov commented 3 years ago

@Cybo1927 commented on Fri Oct 23 2020

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Issue Details

Expected Behavior

When you have a website blacklisted which also has a comment (such as, ||grabify.link #Comment) it should still filter the domain

Actual Behavior

The blocking is bypassed because of the comment

Screenshots

Screenshot: https://i.imgur.com/kFkXPmY.png https://i.imgur.com/pu9oEDp.png

Additional Information

It works with filters in non adblock syntax such as https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt

ameshkov commented 3 years ago

I wouldn't consider this a bug, in the spec it's clear that the line should start with # or !, and it shouldn't be in the middle.

But I'll see if we can implement it the way you'd like.