Skip to content

Unexpected   in pasted content #11912

Closed

Description

@moorscode

Describe the bug
When pasting a text string ending in a space, a non-breaking space is being added.
This only happens if the text is being written in a block and copied from there.

A string copied from another program will not yield these results.

To Reproduce
Steps to reproduce the behavior:

  1. I type the following piece of text in a paragraph block in the visual mode: "This is a text. "
  2. I copy the piece of text to my clipboard
  3. I paste the piece multiple times after each other, so they will be sentences within the same paragraph
  4. I save the post
  5. I reload the post
  6. I open the code editor and see a lot of   entries.

More instant results:

  1. I type the following piece of text in a paragraph block in the visual mode: "This is a text. "
  2. I switch to the code editor
  3. I copy the piece of text (including the space)
  4. I paste the text several times
  5. I press "update"
  6. The spaces are instantly converted into   entries
  7. Reloading the page does gives the same results.

Bit differently in this order:

  1. I type the following piece of text in a paragraph block in the visual mode: "This is a text. "
  2. I copy the text (including the space)
  3. I switch to the code editor
  4. I paste the text after the existing text
  5. I press "publish"
  6. The space after the first piece of copy is converted to a   the rest of the spaces are normal
  7. Reloading the page does gives the same results.

Expected behavior
I expect a regular space to be added instead of a non-breaking space. This will glue my two sentences together.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 70.0

Additional context

  • Gutenberg 4.3.0
  • WordPress 4.9.8

Activity

  1. added
    [Type] Bug
    Needs Testing
    on Nov 15, 2018
  2. ellatrix commented on Nov 26, 2018

    @ellatrix
    Member

    I think #12166 should fix this issue. Could you confirm? Also, this seems to a duplicate of #7474?

  3. ellatrix commented on Nov 30, 2018

    @ellatrix
    Member

    Should be fixed by #12166. Please reopen if that's not the case.

  4. giles14 commented on Aug 20, 2021

    @giles14

    I'm still seeing this, when I copy-paste content from another source (including Wordpress editor) after and before using <strong> </strong> tags.

  5. ellatrix commented on Aug 20, 2021

    @ellatrix
    Member

    @giles14 could you please create a new issue?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Testing[Feature] Paste[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions