Slate: U+FEFF as a ZWNBSP character is deprecated

Created on 13 Feb 2019  Â·  3Comments  Â·  Source: ianstormtaylor/slate

See: https://www.w3.org/TR/unicode-xml/#BOM

I'm pretty sure that Slate is using the U+FEFF character in a way that is now deprecated in Unicode 3.2. I see that Slate switched from U+200B to using this character to fix this issue: https://github.com/ianstormtaylor/slate/issues/2231. It's recommended to use U+2060 instead as a zero-width non-breaking space character. I think that issue would not be a problem if Slate used U+2060 instead.

I discovered this issue when sanitizing the HTML in my backend. U+FEFF is stripped from the content, but U+2060 is kept.

bug ♥ help

Most helpful comment

I think the idea in #1971 about implementing this via <br/> is more solid. Any invisible characters are bad in an editor, since users might copy text from it, and it might be links, source code, etc - and invisible characters often cause cryptic errors

All 3 comments

I don't know much about this but I'm sure we'd welcome a PR if this is the right character to be using.

I don't know how quickly we should jump on this. If you scroll to the top of the referenced Technical Report, the Status part says:

This document has been withdrawn
Many of the materials in this document are stale and out of date; the W3C is maintaining this version solely as a historical reference. This document was originally produced as a joint publication between the W3C and the Unicode Consortium. In 2016, Unicode withdrew publication as a Unicode Technical Report.

I was unable to locate a current, published version of this particular report. On the other hand, maybe this deprecation is repeated in some more general Unicode Report?

I think the idea in #1971 about implementing this via <br/> is more solid. Any invisible characters are bad in an editor, since users might copy text from it, and it might be links, source code, etc - and invisible characters often cause cryptic errors

Was this page helpful?
0 / 5 - 0 ratings