Native support for unicode No Break space

There are many ways to encode NBSP in HTML. Two of them are <p>non-breaking space</p> and <p>non-breaking&nbsp;space</p>.

There are plenty of ways to encode NBSP in Markdown too. The most common two are again non-breaking space and non-breaking&nbsp;space. Regardless of which Markdown representation you choose, the CommonMark reference implementation always chooses to convert it to <p>non-breaking space</p> in HTML.

That’s why you see <p>non-breaking space</p>, not <p>non-breaking&nbsp;space</p> in the “HTML” tab of the online dingus. See it yourself.

Now try to copy non-breaking space from any rendered output. What you’ll get in your clipboard is non-breaking and space with the plain old 0x20 space between them. Even though what you copy actually contains NBSP, your browser replaces it with the plain old space on copying, for some unknown reason.

It’s a bug (or maybe a feature) which is present in both Firefox and Chromium. I couldn’t find any exact info on why this happens.

There’s this 10-year-old open bug in Mozilla’s Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=359303.