Skip to content

expose parse5 option scriptingEnabled#1707

Merged
fb55 merged 4 commits intocheeriojs:mainfrom
5saviahv:scriptingEnabled
Feb 7, 2021
Merged

expose parse5 option scriptingEnabled#1707
fb55 merged 4 commits intocheeriojs:mainfrom
5saviahv:scriptingEnabled

Conversation

@5saviahv
Copy link
Contributor

@5saviahv 5saviahv commented Feb 1, 2021

Expose scriptingEnabled option. It would accept false value only, all other cases it should stay true.

<noscript><link rel="stylesheet" href="/css/noscript.css"></noscript>

It should help parse some documents where noscript elements are used.
If true (default) all html code inside noscript elements will treated as text,
if false all html code inside noscript elements will treated as html and parsed accordingly.

#1105

@fb55
Copy link
Member

fb55 commented Feb 4, 2021

This looks great! Could you (1) add a simple test case and, optionally, (2) add this to the TS type def?

@fb55 fb55 merged commit 7eb4cc4 into cheeriojs:main Feb 7, 2021
@fb55
Copy link
Member

fb55 commented Feb 7, 2021

Thanks a lot!

@5saviahv 5saviahv deleted the scriptingEnabled branch February 7, 2021 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants