CoreLibs
CoreLibs copied to clipboard
Allow to remove content with empty attribute
Issue Details
For example, if there are 2 scripts like:
<script src="test1.js"></script>
<script src="test2.js" defer></script>
And we want to remove only this with defer attribute using rule like:
example.org$$script[src="test"][defer]
Then it doesn't work.
Steps to reproduce:
- Add these rules:
||example.org^$replace=/<\/head>/<script src="test1.js"><\/script><script src="test2.js" defer="abcd"><\/script><\/head>/,document
example.org$$script[src="test"][defer]
- Go to - https://example.org/
Script with defer attribute should be removed.
Proposed solution
Allow to remove content with empty attribute so mentioned rule will remove only this script which has defer attribute.
Alternative solution
No response