skatejs/named-slots

Text nodes do not get escaped when getting innerHTML

jpnelson opened this issue · 0 comments

The innerHTML getter cannot just return textContent.

See https://w3c.github.io/DOM-Parsing/#serializing , scroll to Text

Replace any occurrences of "&" in markup by "&".
Replace any occurrences of "<" in markup by "&lt;".
Replace any occurrences of ">" in markup by "&gt;".
Return the value of markup.

We will need to do this manually when getting the innerHTML of something containing a text node.