• Hi,

    I’m using the Classic Editor plugin on my site and have recently had a problem with it inserting non-breaking spaces whenever two spaces are typed. It converts the two normal spaces into a regular space followed by a non-breaking space (HTML entity   ).

    It never used to do this, but it has become a real problem and I haven’t been able to find a way to fix it.

    I’ve tested using the Classic block in the Gutenberg editor, but it doesn’t seem to have the problem. Just if I’m using the Classic Editor (with TinyMCE interface) instead of the Block Editor.

    Any thoughts/help are appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi @thervgeeks – it would be helpful to get a better understanding of your end goal: are you intending/wanting to display two spaces on the front end, or only one? Is this new non-breaking space phenomenon happening after punctuation like periods, or something else? Are you pasting text from another source into the editor, or typing into it directly?

    I’ve also noticed that the Classic Editor was last updated 4 months ago, but you mentioned this issue only started recently. Could you confirm when the issue started? Thanks!

    Thread Starter TheRVgeeks

    (@thervgeeks)

    Hi @zoonini – Thanks. Sorry I wasn’t more clear. These are seemingly accidental (or muscle memory) from old-school typing technique… putting the two spaces after a period. I don’t really want them to show as two spaces, but because the interface is changing two regular spaces into on regular and one non-breaking, they’re showing. Plus, the non-breaking spaces are sometimes being left behind and then mess up the flow of the text at various screen sizes.

    I spooled up a staging version of my site and tried disabling all of the plugins except the Classic Editor… and that appears to have fixed it. Now, it’s just a matter of trying to identify which plugin(s) are causing the problem or the conflict.

    If you have any other ideas about what I can try, that would be great. Otherwise, I’ll report back here if I can identify the source of the issue.

    Thanks!

    Moderator Kathryn Presner

    (@zoonini)

    @thervgeeks – Thanks for clarifying! So you actually don’t want the two space preserved on the front end.

    I’m not sure why it wouldn’t have behaved this way so in the past, but the editor is currently adding a non-breaking space so that what you type (i.e. two spaces) is what’s actually displayed on the front end, which does seem like the expected behaviour. The more confusing/unexpected behaviour would probably be to type two spaces but only see one displayed on the front end. ?? But I definitely understand that you had been relying on the automatic removal of one space, previously!

    I am actually able to replicate the appearance of a non-breaking space with only the Classic Editor activated – and no others – so I’m not sure why you’re seeing something different. Are you using WordPress 6.1.1?

    Thread Starter TheRVgeeks

    (@thervgeeks)

    @zoonini – Correct. I’d rather not have the two spaces preserved when viewed on the front end… particularly the non-breaking space. When editing, sometimes the non-breaking space is retained when you’re moving content around or re-structuring at all… so then the text doesn’t wrap correctly on smaller screens.

    Interesting that you’re seeing the behavior with just the Classic Editor activated. I’m using WP v6.1.1… but maybe something’s different about my staging environment. I’ll have to check again to see if maybe somehow I missed it happening.

    Correct. I’d rather not have the two spaces preserved when viewed on the front end…

    Hi @thervgeeks at the moment the best option would be not to add the space when you are typing. Avoid hitting the space button twice after putting a period.

    but maybe something’s different about my staging environment. I’ll have to check again to see if maybe somehow I missed it happening.

    You mentioned that you are getting this issue when all the other plugins are deactivated, might l suggest activating them back one by one to see which one might start causing this?
    Additionally, temporarily deactivating to one of the default Twenty ** themes is one way of troubleshooting issues.

    How about the editor just LEAVES HTML ENTITIES ALONE when entered on the text tab, and doesn’t assume the user wants one space changed to two or two to one anywhere else?

    This has been an issue for over 11 years, so it surprises me every time when people are surprised.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Classic Editor Inserting Non-Breaking Spaces’ is closed to new replies.