You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Pasting a copied text whose HTML contains an empty tag converts the tag into a non-breaking space, even if the spaces around (or inside) the tag are normal spaces.
To reproduce
Steps to reproduce the behavior:
Copy a text whose HTML contains an empty , eg. Hello World (Hello World)
Paste it on the editor
Check the console or switch to HTML.
See the processed HTML, in our example Hello World
Expected behavior
As none of the spaces in or around the empty tag are , the space(s) in the processed HTML should be normal spaces and not .
OS: iOS
Browser chrome
Version 81
Additional context
The can be either empty or containing a normal space, result is the same. No classes or other attributes are present on the tag.
This issue is kinda nasty as it causes visualization problems on the front, especially on mobile, because the extra s lead to unexpected text overflows (that can't be mitigated via CSS) and subsequently some strange layout issues and horizontal scrolling.
I've discovered this behavior copy-pasting from random Wikipedia articles to have some rich text dummy content. Strangely enough, the HTML from Wikipedia doesn't contain any empty tags, but the received HTML logged by Gutenberg in the console does.
The text was updated successfully, but these errors were encountered:
Describe the bug
Pasting a copied text whose HTML contains an empty tag converts the tag into a non-breaking space, even if the spaces around (or inside) the tag are normal spaces.
To reproduce
Steps to reproduce the behavior:
Expected behavior
As none of the spaces in or around the empty tag are , the space(s) in the processed HTML should be normal spaces and not .
Editor version
WordPress version: 5.4
Default block editor
Desktop
OS: iOS
Browser chrome
Version 81
Additional context
The can be either empty or containing a normal space, result is the same. No classes or other attributes are present on the tag.
This issue is kinda nasty as it causes visualization problems on the front, especially on mobile, because the extra s lead to unexpected text overflows (that can't be mitigated via CSS) and subsequently some strange layout issues and horizontal scrolling.
I've discovered this behavior copy-pasting from random Wikipedia articles to have some rich text dummy content. Strangely enough, the HTML from Wikipedia doesn't contain any empty tags, but the received HTML logged by Gutenberg in the console does.
The text was updated successfully, but these errors were encountered: