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

exclude ##.adsbygoogle #729

Merged
merged 2 commits into from
Feb 17, 2023
Merged

Conversation

Yuki2718
Copy link
Contributor

For easylist/easylist@c09ae08

BTW isn't ^ needed for /###banner_ad$/ as well? Specific ###banner_ad may be used by good reason.

@AdamWr
Copy link
Member

AdamWr commented Feb 17, 2023

I guess it's /###banner_ad$/, because there is a rule like this ~bg-ikonomika.com###banner_ad in the Bulgarian list.
Maybe it should be changed to something like - /^(~.*)?###banner_ad$/?

By the way, now I have noticed that also ROList has rule like this ~4tuning.ro##.adsbygoogle and xinggsf has ~google.com##.adsbygoogle

So maybe it also should be - /^(~.*)?##\.adsbygoogle$/?

@AdamWr AdamWr requested a review from a team February 17, 2023 12:25
@AdamWr AdamWr merged commit eece38f into AdguardTeam:master Feb 17, 2023
@Yuki2718 Yuki2718 deleted the exclude_adsbygoogle branch February 17, 2023 12:34
@Yuki2718
Copy link
Contributor Author

Now I think of, there can theoretically be this type of specific filter: ~a.foo.com,foo.com##.adsbygoogle
So I suggest to change to /^(~[-.a-z]+,?)*##\.adsbygoogle$/

@AdamWr
Copy link
Member

AdamWr commented Feb 18, 2023

That's a good point, but if I'm not wrong, it will not cover all cases.
For example, it will not match domains with digits or with "punycode".
Maybe something like this:

^(~([-.\w\d*]|[^\x00-\x7F])+,?)*##\.adsbygoogle$

will be okay (https://regex101.com/r/LLqMr0/1), but I'm still not sure if all cases will be catched.

Comment on lines +40 to +42
/^(~.*)?###banner_ad$/
/^(~.*)?##\.adsbox$/
/^(~.*)?##\.afs_ads$/
Copy link
Member

@Alex-302 Alex-302 Feb 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why changed? /^## was enough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can there be harm? Some filter may add ~foo.com##.afs_ads in future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

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

Successfully merging this pull request may close these issues.

5 participants