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

Allow to remove content with empty attribute #1934

Open
AdamWr opened this issue Nov 25, 2024 · 0 comments
Open

Allow to remove content with empty attribute #1934

AdamWr opened this issue Nov 25, 2024 · 0 comments

Comments

@AdamWr
Copy link
Member

AdamWr commented Nov 25, 2024

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:

  1. 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]
  1. 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

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

3 participants