Prerequisites
I tried to reproduce the issue when...
Description
$replace filter cannot replace dollar ($) sign if targeted directly. It can be workarounded by using . (any character in regex) instead of $ but it could be a bit inaccurate way to match and replace something...
Also, if dollar sign is being used as a part of a string to match, nothing will be matched (or replaced). It just breaks the filter.
A specific URL where the issue occurs.
https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-e43198c9c229.js
Steps to Reproduce
- Test filters:
||github.githubassets.com/*relative-time-element*js$replace=/\$/Test/g
or
||github.githubassets.com/*relative-time-element*js$replace=/\${s}Display/Test/
- Open the URL to notice that no replacement was done.
Expected behavior
Dollar sign would have been replaced.
Actual behavior
Nothing was replaced.
uBO version
1.65.1b2
Browser name and version
FF 141.0.3
Operating System and version
Win 10
Prerequisites
I tried to reproduce the issue when...
Description
$replacefilter cannot replace dollar ($) sign if targeted directly. It can be workarounded by using.(any character in regex) instead of$but it could be a bit inaccurate way to match and replace something...Also, if dollar sign is being used as a part of a string to match, nothing will be matched (or replaced). It just breaks the filter.
A specific URL where the issue occurs.
https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-e43198c9c229.jsSteps to Reproduce
||github.githubassets.com/*relative-time-element*js$replace=/\$/Test/gor
||github.githubassets.com/*relative-time-element*js$replace=/\${s}Display/Test/Expected behavior
Dollar sign would have been replaced.
Actual behavior
Nothing was replaced.
uBO version
1.65.1b2
Browser name and version
FF 141.0.3
Operating System and version
Win 10