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

HTML parser fails on cbc.ca #2221

Closed
ameshkov opened this issue May 24, 2018 · 4 comments

Comments

@ameshkov
Copy link
Member

commented May 24, 2018

A report by @AdamWr:

Does something changed in the way how $$ rules work in the newest nightly version (6.3.1080.3435)?
I wanted to remove a script from this website - http://www.cbc.ca/ (this script start with cxrgxs=[{"regex":"class) and I wanted to use for example this rule:
cbc.ca$$script[tag-content="cxresources"][max-length="250000"]

Unbalanced script tags inside of a script lead to a parser mistake:

n.write("<script>NodeList.prototype.forEach = Array.prototype.forEach;"+i+"/script>"),n.write('<style type="text/css">body { margin: 0px;overflow: hidden; }</stye>')):S||n.write("<script>document.close();"+i+"/script>"),

So I guess we need to roll it back after all :(

@ameshkov ameshkov added the bug label May 24, 2018
@ameshkov ameshkov added this to the 6.3 milestone May 24, 2018
@ameshkov ameshkov added the P2: High label May 24, 2018
@ameshkov

This comment has been minimized.

Copy link
Member Author

commented May 24, 2018

@sfionov @Stillness-2 guys, you'll need to handle it too

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented May 24, 2018

I guess @Stillness-2 was right about it -- we'd better handle HTML comments inside of a tag. It is not fully the same as what browsers do, but still it's better than what we had.

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented May 24, 2018

Moreover, I'd better keep the old code with no change :)

@adbuker

This comment has been minimized.

Copy link

commented May 25, 2018

resolved in adguard-windows/pull-requests/113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.