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

$replace rules with comma work incorrectly #3019

Open
3 tasks done
AdamWr opened this issue Oct 30, 2024 · 0 comments
Open
3 tasks done

$replace rules with comma work incorrectly #3019

AdamWr opened this issue Oct 30, 2024 · 0 comments

Comments

@AdamWr
Copy link
Member

AdamWr commented Oct 30, 2024

Please answer the following questions for yourself before submitting an issue

  • Filters were updated before reproducing an issue
  • I checked the knowledge base and found no answer
  • I checked to make sure that this issue has not already been filed

AdGuard Extension version

4.4.30

Browser version

Firefox

OS version

Windows 11

Ad Blocking

AdGuard Base filter

Privacy

No response

Social

No response

Annoyances

No response

Security

No response

Other

No response

Language-specific

No response

What Tracking protection options do you have enabled?

No response

Issue Details

Steps to reproduce:

  1. Add this rule:
||example.org^$replace=/Example Domain/Example\, Domain/
  1. Go to - https://example.org/

Expected Behavior

Content should be modified to:

Example, Domain

Actual Behavior

Content is modified to:

Example\, Domain

Screenshots

Screenshot extension Firefox

image

Additional Information

According to documentation, a comma , should be escaped in $replace rules and if it's not escaped then rule is not applied.
The problem is that \ is added to the content but should not be and in the app it is not.

Screenshot app for Windows

image

https://adguard.com/kb/general/ad-filtering/create-own-filters/#replace-modifier

In the $replace value, two characters must be escaped: comma , and dollar sign $. Use backslash \ for it. For example, an escaped comma looks like this: \,.

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