Re: [whatwg/dom] Valid/Invalid characters in document.createElement() (#849)

@annevk I think that it would also be reasonable to disallow lone surrogates. It’s [possible to get them into the input stream with document.write](https://html.spec.whatwg.org/multipage/parsing.html#parse-error-surrogate-in-input-stream) and they’re accepted as chardata unchanged via innerHTML, etc, but they’d normally end up converted to U+FFFD in html document parsing scenarios (e.g. if one “appeared” in a document parsed as UTF-8, WTF-8 style). Given the translation there would be non-ascii→non-ascii, it may not be a major hazard, but it’s pretty hard to imagine any benefit to allowing them in names and not too hard to imagine it causing problems.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/849#issuecomment-1058091526

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/849/1058091526@github.com>

Received on Thursday, 3 March 2022 14:23:35 UTC