cl-html5-parser icon indicating copy to clipboard operation
cl-html5-parser copied to clipboard

How should we treat the contents of <noscript>?

Open patchyderm opened this issue 7 years ago • 0 comments

In this example,

(html5-parser:parse-html5 "<noscript><p><b>Please turn on Javascript.</b></p></noscript>")

the noscript element's CHILD-NODES is this.

(#<HTML5-PARSER::TEXT-NODE "<p><b>Please turn on Javascript.</b></p>" {12A47249}>)

Why does cl-html5-parser choose to treat the child element as just text, instead of parsing them as html? It seems the Python html5lib takes an optional "scripting" argument that affects how noscript behaves.

https://github.com/html5lib/html5lib-python/blob/950ea0ec60970ba1c88bd9e35d8d85c2a1f318e4/html5lib/html5parser.py#L277

What do you all (users, maintainers of the library) think about an option like this?

patchyderm avatar Oct 08 '18 22:10 patchyderm