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

“##+js(rmnt, #text, [...])” rule with non-ASCII UTF-8 characters is not converted #1946

Open
DimitrisKalaboukas opened this issue Dec 19, 2024 · 6 comments

Comments

@DimitrisKalaboukas
Copy link

Issue Details

AdGuard can’t apply rules with “##+js(rmnt, #text, [...])” syntax.

Proposed solution

Add support for “##+js(rmnt, #text, [...])” rule syntax, as uBlock Origin already does.

Alternative solution

Convert such rules to “#%#//scriptlet(‘rmnt’, ‘#text’, ‘[...]’)” syntax and support it.

@sfionov
Copy link
Member

sfionov commented Dec 25, 2024

@DimitrisKalaboukas This rule should be converted to #%#//scriptlet('ubo-rmnt', '#text', '[...]'), which is already supported. Can you please give an example of rule that does not convert?

@DimitrisKalaboukas
Copy link
Author

@sfionov The conversion is done automatically or I have to make it manually?

@sfionov
Copy link
Member

sfionov commented Dec 27, 2024

@DimitrisKalaboukas It is done automatically. And if corresponding alias exists, it will be applied. In case of uBO's rmnt
it exists.

@DimitrisKalaboukas
Copy link
Author

@sfionov However, the rule:

gizchina.gr##+js(rmnt, #text, /^(\s*-----------\s*|Μπορεί να λάβουμε ένα μικρό ποσοστό εάν κάνετε κλικ σε έναν σύνδεσμο και αγοράσετε κάποιο προϊόν. Για περισσότερες λεπτομέρειες, | μπορείτε να μάθετε πώς χρησιμοποιούμε τους συνδέσμους συνεργατών. |Σας ευχαριστούμε για την υποστήριξη.|Ακολουθήστε το | για νέα και ειδήσεις στον χώρο της τεχνολογίας. Αν ψάχνετε HOT προσφορές και κουπόνια για κινητά και gadgets, κάντε εγγραφή στο | στο )$/)

isn’t applied by AdGuard for Android. I wonder if it is due to the rule’s length.

@sfionov
Copy link
Member

sfionov commented Dec 27, 2024

@DimitrisKalaboukas Thanks for the example, it seems that rules with non-ascii symbols are not converted by some reason. I'll move this task into the CoreLibs repo.

@sfionov sfionov transferred this issue from AdguardTeam/AdguardForAndroid Dec 27, 2024
@sfionov sfionov changed the title Add support for “##+js(rmnt, #text, [...])” rule syntax “##+js(rmnt, #text, [...])” rule with non-ASCII UTF-8 characters is not converted Dec 27, 2024
@adguard-bot adguard-bot assigned anyakushin and unassigned ESurina Dec 27, 2024
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

7 participants