Make WordPress Core

Opened 5 years ago

Last modified 4 years ago

#48464 new defect (bug)

Issues with non-breaking spaces on Windows

Reported by: peexy's profile peexy Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: administration Cc:

Description (last modified by SergeyBiryukov)


I recently noticed an issue with non-breaking spaces: when inserted with keyboard shortcuts (like ALT+255 on Windows or ALTGr+< using an enhanced keyboard), they seem to be removed by WordPress (or not interpreted as such at all).

We need to add them either by typing &nbsp; or by pasting it from an external file. Which is not very convenient.

With @webaxones and @audrasjb we did some digging, here's what we found:

1/ It seems to appear only on Windows (tested on Windows 10) since JB tested it on his Mac and couldn't reproduce it

2/ It does not seem to be browser specific since we reproduced the bug on Chrome 78.0.3904.70 and Firefox 70.0;

3/ It's not plugin related since I've been able to reproduce it on a fresh install;

4/ It's not somehow Gutenberg related since I've been able to reproduce it on a totally random old version: WP 4.7.7 (fresh install as well, haven't tried with older versions);

5/ It may be related to #26842;

6/ Other shortcuts works fine;

7/ We tested the shortcuts on other browser-based editors (like Google Docs) and they work fine.

As far as we know, it could be either (or both):

  • A very old issue with WordPress
  • A bug related to a change made in Windows or in browsers that affects how WordPress interacts with these shortcuts.


Change History (6)

#1 @audrasjb
5 years ago

Related: #26842

#2 @audrasjb
5 years ago

Related: #31156

#3 @peexy
5 years ago

I forgot to credit @bonaldi for his help with the digging.

#4 @SergeyBiryukov
5 years ago

  • Component changed from General to Editor
  • Description modified (diff)

#5 @Chaton666
4 years ago


I have the same problem with Firefox 72.0.2 on Ubuntu.
When I insert non-breaking spaces with AltGr + Maj + Space shortcut (extended keyboard), the editor does not seem to interpret them, because they are replaced by normal spaces.

However, it works under Chromium web browser.

#6 @peexy
4 years ago

Also related to this ticket: (even though this ticket is only Gutenberg related)

Note: See TracTickets for help on using tickets.