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

Some matches-attr rules with {n,} in regex are highlighted as error #2401

Closed
Yuki2718 opened this issue Jul 17, 2023 · 3 comments
Closed

Some matches-attr rules with {n,} in regex are highlighted as error #2401

Yuki2718 opened this issue Jul 17, 2023 · 3 comments

Comments

@Yuki2718
Copy link

AdGuard Extension version

4.1.56

Browser version

Brave v1.52.130

OS version

Windows 10

What filters do you have enabled?

AdGuard Base filter, AdGuard Japanese filter

What Stealth Mode options do you have enabled?

No response

Issue Details

This User rule pussyspace.com,pussyspace.net#?#.itemsetbox [class]:matches-attr("class"="/[0-9A-Za-z]{18,}/") [id] img:not(a img) is highlighted as error. This also caused false positive, but apparently it was due to AdguardTeam/ExtendedCss#166 and not related to the problem here. Error disappers if I remove {18,}, but some rules in Japanese filters don't show error despite having {n,}, namely:

realtime-chart.info#?#.news_b table[border="0"][cellpadding="5"][style="background:#fff"] > tbody >  tr[bgcolor="#fff"] > td.newsarea[style] > a.wl[href^="https://a"][href*=".to/"]:upward(2)
realtime-chart.info#$?#div[id] > [id]:has(> [style^="top:1"]:matches-attr("style"="/top\s*:\s*1\d{3}\.?\d*px/")) + * > [style^="top:1"]:matches-attr("style"="/top\s*:\s*1\d{3}\.?\d*px/") > [onclick]:not(:has(td > a))  { pointer-events: none !important; }
realtime-chart.info#$?#div[id] > [id]:has(> [style^="top:1"]:matches-attr("style"="/top\s*:\s*1\d{3}\.?\d*px/")) + * > [style^="top:1"]:matches-attr("style"="/top\s*:\s*1\d{3}\.?\d*px/") > [style*="font-size:"]:is(b, span, a):not(:has(td > a)) { font-size: 0 !important; pointer-events: none !important; }
realtime-chart.info#$?#td[style^="vertical-align"] div[style*="top"]:matches-attr("style"="/^\s*top\s*:\s*3\d{2}\.?\d*px;?\s*/") > a[id][onmousedown] { pointer-events: none !important; }
realtime-chart.info#$?#td[style^="vertical-align: top"] [onclick*="()"][target="_blank"]:has([style*="background-image: url\(\"data:image/jpg;"]:matches-attr("style"="/height\s*:\s*[12]\d{2}\.?\d*px/")) { pointer-events: none !important; }
realtime-chart.info#$?#td[style^="vertical-align"] [style*="top"]:matches-attr("style"="/^\s*top\s*:\s*3\d{2}\.?\d*px;?\s*/") > a[id][onmousedown] { pointer-events: none !important; }

The only rule also shows error is realtime-chart.info#?#td[style^="vertical-align"] div[id] [style*="top"]:matches-attr("style"="/^\s*top\s*:\s*3\d{2}\.?\d*px;?\s*/") ~ [class][onclick]:has(> [style^="top:1"]):matches-attr("style"="/top\s*:\s*1\d{3}\.?\d*px/"):not(:has(td > a)) which I removed by AdguardTeam/AdguardFilters@7b7094c
The rules seem to work, so maybe they're incorrectly flagged as error.

Expected Behavior

No error

Screenshots

Screenshot 1:

rules

Additional Information

No response

@Yuki2718
Copy link
Author

Yuki2718 commented Aug 10, 2023

Confirmed it's fixed in 4.2.151 Beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@adguard-bot @Yuki2718 @Birbber and others