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

Add support for the :style pseudo class syntax #701

Closed
ameshkov opened this issue Jul 18, 2016 · 4 comments

Comments

@ameshkov
Copy link
Member

commented Jul 18, 2016

Based on:
AdguardTeam/AdguardFilters#2571

Also we should add CSS pseudo classes validation.

@ameshkov ameshkov added the Filtering label Jul 18, 2016
@ameshkov ameshkov added this to the 2.7 milestone Jul 18, 2016
@ameshkov ameshkov self-assigned this Jul 18, 2016
@ameshkov ameshkov changed the title Add support for :style syntax Add support for :style pseudo-element syntax Jul 18, 2016
@ameshkov ameshkov changed the title Add support for :style pseudo-element syntax Add support for the :style pseudo-element syntax Jul 18, 2016
@ameshkov ameshkov changed the title Add support for the :style pseudo-element syntax Add support for the :style pseudo class syntax Jul 18, 2016
@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Jul 18, 2016

Done

@ameshkov ameshkov closed this Jul 18, 2016
@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Jul 19, 2016

17:18:00.004 [pool-4-thread-2] WARN  com.adguard.filter.rules.FilterRule - Error creating filter rule ##a[href^="http://www.FriendlyDuck.com/AF_"]:
{}
java.lang.IllegalArgumentException: Unknown pseudo class: a[href^="http://www.FriendlyDuck.com/AF_"]
    at com.adguard.filter.rules.CssFilterRule.<init>(CssFilterRule.java:107) ~[na:0.0]
    at com.adguard.filter.rules.FilterRule.createRule(FilterRule.java:104) ~[na:0.0]
    at com.adguard.filter.filters.RequestFilter.addRule(RequestFilter.java:80) ~[na:0.0]
    at com.adguard.filter.filters.RequestFilter.addRules(RequestFilter.java:96) ~[na:0.0]
    at com.adguard.android.filtering.filter.HttpFilter.initialize(HttpFilter.java:118) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.initializeHttpFilter(ProtectionServiceImpl.java:286) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.configureHttpFilter(ProtectionServiceImpl.java:303) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.access$400(ProtectionServiceImpl.java:35) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl$StartVpnServiceTask.processTask(ProtectionServiceImpl.java:320) ~[na:0.0]
    at com.adguard.android.service.LongRunningTask.execute(LongRunningTask.java:46) ~[na:0.0]
    at com.adguard.commons.concurrent.DispatcherThreadPool$DispatcherTaskRunner.run(DispatcherThreadPool.java:206) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) ~[na:0.0]
    at java.lang.Thread.run(Thread.java:818) ~[na:0.0]
@ameshkov ameshkov reopened this Jul 19, 2016
@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Jul 19, 2016

18:09:48.782 [pool-4-thread-1] WARN  com.adguard.filter.rules.FilterRule - Error creating filter rule msn.com##.todaystripe::after:

java.lang.StringIndexOutOfBoundsException: length=1; index=1
    at java.lang.String.charAt(Native Method) ~[na:0.0]
    at com.adguard.filter.rules.CssFilterRule.parsePseudoClass(CssFilterRule.java:169) ~[na:0.0]
    at com.adguard.filter.rules.CssFilterRule.<init>(CssFilterRule.java:102) ~[na:0.0]
    at com.adguard.filter.rules.FilterRule.createRule(FilterRule.java:104) ~[na:0.0]
    at com.adguard.filter.filters.RequestFilter.addRule(RequestFilter.java:80) ~[na:0.0]
    at com.adguard.filter.filters.RequestFilter.addRules(RequestFilter.java:96) ~[na:0.0]
    at com.adguard.android.filtering.filter.HttpFilter.initialize(HttpFilter.java:118) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.initializeHttpFilter(ProtectionServiceImpl.java:286) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.configureHttpFilter(ProtectionServiceImpl.java:303) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.access$400(ProtectionServiceImpl.java:35) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl$StartVpnServiceTask.processTask(ProtectionServiceImpl.java:320) ~[na:0.0]
    at com.adguard.android.service.LongRunningTask.execute(LongRunningTask.java:46) ~[na:0.0]
    at com.adguard.commons.concurrent.DispatcherThreadPool$DispatcherTaskRunner.run(DispatcherThreadPool.java:206) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) ~[na:0.0]
    at java.lang.Thread.run(Thread.java:818) ~[na:0.0]
18:09:48.827 [pool-4-thread-1] WARN  com.adguard.filter.rules.FilterRule - Error creating filter rule ###Meebo\:AdElement\.Root:

java.lang.IllegalArgumentException: Unknown pseudo class: #Meebo\:AdElement\.Root
    at com.adguard.filter.rules.CssFilterRule.<init>(CssFilterRule.java:108) ~[na:0.0]
    at com.adguard.filter.rules.FilterRule.createRule(FilterRule.java:104) ~[na:0.0]
    at com.adguard.filter.filters.RequestFilter.addRule(RequestFilter.java:80) ~[na:0.0]
    at com.adguard.filter.filters.RequestFilter.addRules(RequestFilter.java:96) ~[na:0.0]
    at com.adguard.android.filtering.filter.HttpFilter.initialize(HttpFilter.java:118) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.initializeHttpFilter(ProtectionServiceImpl.java:286) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.configureHttpFilter(ProtectionServiceImpl.java:303) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl.access$400(ProtectionServiceImpl.java:35) ~[na:0.0]
    at com.adguard.android.service.ProtectionServiceImpl$StartVpnServiceTask.processTask(ProtectionServiceImpl.java:320) ~[na:0.0]
    at com.adguard.android.service.LongRunningTask.execute(LongRunningTask.java:46) ~[na:0.0]
    at com.adguard.commons.concurrent.DispatcherThreadPool$DispatcherTaskRunner.run(DispatcherThreadPool.java:206) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) ~[na:0.0]
    at java.lang.Thread.run(Thread.java:818) ~[na:0.0]
@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Jul 19, 2016

Fixed

@ameshkov ameshkov closed this Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.