Skip to content

Hickory does not correctly parse <noscript> tags in <head> #52

Open
@eigenhombre

Description

Hickory doesn't parse noscript tags correctly when they are in the head, but does when it is in body. noscript should be supported in both.

(require '[hickory.core :as hick]
         '[hickory.render :as hr])

(-> "
<html>
 <body>
  <noscript>Ceçi n'est pas de JavaScript</noscript>
 </body>
</html>"
    hick/parse
    hick/as-hickory
    hr/hickory-to-html)

;;=>
'"<html><head></head><body>\n  <noscript>Ceçi n'est pas de JavaScript</noscript>\n \n</body></html>"


(-> "
<html>
 <head>
  <noscript>Ceçi n'est pas de JavaScript</noscript>
 </head>
</html>"
    hick/parse
    hick/as-hickory
    hr/hickory-to-html)

;;=>
'"<html><head>\n  <noscript></noscript></head><body>Ceçi n'est pas de JavaScript\n \n</body></html>"

Metadata

Assignees

No one assigned

    Labels

    category: parsingCorrectness and Edge Cases. Hail the DOMtype: bugSomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions