You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like lol-html currently parses the <noscript> element as RawText, along with the usual candidates like <style> and <iframe>. That's the correct behavior when parsing/tokenizing HTML with the scripting flag enabled.
It begs a question whether lol-html should be pretending to have the scripting flag enabled or disabled. I could see arguments either way, and it would at least be a useful option to have. In the current state, it's impossible to rewrite these elements that will be shown for end users not running JavaScript.
I don't know if there would be any real ramifications to turning the scripting flag on — from what I can see it only affects tokenization/parsing of the <noscript> element. The main downside would be breaking/confusing the parser if the <noscript> contains garbage — but since it should contain HTML in the case where scripting is disabled, valid HTML should be a reasonable expectation here.
It looks like
lol-html
currently parses the<noscript>
element as RawText, along with the usual candidates like<style>
and<iframe>
. That's the correct behavior when parsing/tokenizing HTML with the scripting flag enabled.It begs a question whether
lol-html
should be pretending to have the scripting flag enabled or disabled. I could see arguments either way, and it would at least be a useful option to have. In the current state, it's impossible to rewrite these elements that will be shown for end users not running JavaScript.I don't know if there would be any real ramifications to turning the scripting flag on — from what I can see it only affects tokenization/parsing of the
<noscript>
element. The main downside would be breaking/confusing the parser if the<noscript>
contains garbage — but since it should contain HTML in the case where scripting is disabled, valid HTML should be a reasonable expectation here.Originally posted by @bglw in #184 (comment)
The text was updated successfully, but these errors were encountered: