AdguardTeam / AdguardTeam/AdguardBrowserExtension

`$replace` rules with comma work incorrectly

Offen
#3,019 1 Kommentar 3 Reaktionen 1 zugewiesene Person Zugewiesen an @maximtop Auf GitHub ansehen
Bug MV2 Priority: P4
Vorherrschende Sprache
TypeScript
Sterne
4.4k
Forks
449
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Please answer the following questions for yourself before submitting an issue

- [X] Filters were updated before reproducing an issue
- [X] I checked the [knowledge base](https://adguard.com/kb/) and found no answer
- [X] 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:
```adblock
||example.org^$replace=/Example Domain/Example\, Domain/
```
2. 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](https://github.com/user-attachments/assets/7d25861f-17e6-4116-a311-d4f7081decfb)

### 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://github.com/user-attachments/assets/4f8b5a53-64f1-4268-8f0c-7da4e8e049a5)

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: `\,`.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.