Skip to content

Non breaking spaces not encoded #3549

Closed

Description

Issue Overview

With responsive websites, big titles or text in small columns are difficult to handle. They often have widows (words alone on the last line of a paragraph) which is not good from a typographic perspective.

In that context where line breaks have to be avoided, non breaking spaces are really useful to keep some control over the text.

I have noticed that non breaking spaces   are removed by Gutenberg when the post is saved.
This is not the case of the current editor where non breaking spaces are kept.

Tested with Gutenberg 1.7

Related to #3220.

Steps to Reproduce (for bugs)

  1. Edit a block as HTML or the entire post in text mode, insert a non breaking space anywhere
  2. Save the post

Expected Behavior

  • Non breaking spaces must be saved (bug)
  • In visual mode mode, non breaking spaces could be revealed (enhancement)
  • In visual mode mode, non breaking spaces could be added easily by using Option + Space on Mac or Ctrl + Shift + Space on Windows (enhancement)

Current Behavior

  • Non breaking spaces are removed from the markup when saving the post
  • Non breaking spaces are removed from the markup when switching from HTML to visual mode
  • Non breaking spaces are invisible in Visual mode

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    [Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditable[Feature] Writing FlowBlock selection, navigation, splitting, merging, deletion...

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions