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

Content script is not injected if there is a tag (with embed attribute) before doctype declaration #1825

Closed
AdamWr opened this issue Nov 15, 2023 · 0 comments

Comments

@AdamWr
Copy link
Member

AdamWr commented Nov 15, 2023

Steps to reproduce:

  1. Add these rules:
example.org##body
||example.org^$replace=/<!doctype html>/<tag embed="PHNjcmlwdCBzcmM9Imh0dHBzOi8vZXhhbXBsZS5vcmcvIiBhc3luYz0iYXN5bmMiPjwvc2NyaXB0Pg=="><\/tag><!doctype html>/
  1. Go to - https://example.org/

Website should be blank, but script is not injected, so element hiding rules do not work.

Screenshot with $replace rule enabled

image

Screenshot with $replace rule disabled

image


Real case is here - AdguardTeam/AdguardFilters#165930
It has been fixed by $replace rule, so to reproduce please add this rule:

@@||transfermarkt.com.tr^$replace=/<tm-consent[\s\S]*?<\/tm-consent>(<!DOCTYPE html>)/\$1/,document

to user rules.

AdGuard for Windows 7.15.0 nightly 28 (4460) (CL 1.13.79, DL 2.4.0 )

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

5 participants