
Perhaps we can revisit again considering Gutenberg doesn't (shouldn't) use wpautop any more.Īn acceptable fix for the "overly-aggressive" U+00A0 invasion in Chrome would probably be to just replace them all with U+0020 on editor cleanup.

Unfortunately it was never implemented as it has the potential to break wpautop and introduce new hard to find/anticipate edge cases there. There is an old core trac ticket attempting to deal with this. To see the interest of the the NO-BREAK SPACE : Choose the option View > Show Symbol > Show all characters. However if the HTML tag is closed (and in some other seemingly random cases) that replacement doesn't seem to happen. The NO-BREAK SPACE character ( of Unicode code-point 00A0) is just displayed as the usual SPACE character and, unfortunately, cannot be visualized, with a specific glyph, when using the option View > Show Symbol. As far as I see they insert one as soon as the user presses the spacebar at the end of each word, and then replace it with a normal space U+0020 later on, when the user continues to type. Lately Chrome/WebKit seem to be getting more aggressive with these nbsp chars. At first only in contenteditable, then started to see that in textareas and even in text fields. To work in more depth with non-breaking spaces, you need to be able to see them. Alternatively, you can select ‘Non-breaking Space’ from the Insert>Special Characters menu. The quickest way is to press Ctrl+Shift+Spacebar (or on a Mac, type Option+Spacebar).
#Remove non breaking space word how to
The browsers have always inserted U+00A0 (nbsp) chars when the user types several spaces. How to work with non-breaking spaces Non-breaking spaces are easy to add. There is no way, all else being equal, that a space at the beginning.

Otherwise, select that little critter and delete it and replace it with a real space.

#Remove non breaking space word code
If your editor allows you to examine the code point, then do so (a non-breaking space would be U+00A0 ). Click where you want to insert the nonbreaking space. This is not new and not only when using the tag. Perhaps you accidentally hit some key combination that inserted a non-breaking space. To keep two words or a hyphenated word together on one line, you can use a nonbreaking space or nonbreaking hyphen instead of a regular space or hyphen.
