Opened 8 weeks ago
Last modified 6 weeks ago
#64967 new defect (bug)
Bug report – Whitespace / non-breaking spaces removed after save in Gutenberg
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Editor | Keywords: | |
| Focuses: | Cc: |
Description
Hello,
I would like to report a critical regression observed in recent WordPress versions (likely introduced in an update around January or February 2026), related to Gutenberg.
🔴 Issue
When editing content in Gutenberg, spaces are removed after saving, resulting in:
words being concatenated
significant readability degradation
extremely time-consuming manual fixes for editorial teams
The issue is not immediately deterministic, but consistently appears after multiple saves or autosaves.
🔁 Steps to reproduce
Copy text from:
Microsoft Word
Google Docs
Paste into a Gutenberg paragraph block
Edit content normally
Save (or let autosave run multiple times)
👉 Observed result after some time:
spaces between certain words disappear
text becomes “merged” without separation
🧪 Expected behavior
Spaces (including / \u00A0) should be preserved
No alteration of text content after saving
❌ Actual behavior
Silent removal of certain spaces
Incorrect conversion or loss during parsing / serialization
Cumulative effect over multiple saves
🧠 Technical analysis (hypotheses)
Several factors may be interacting:
- Trim / DOM cleanup conflict
Some functions treat \u00A0 as removable whitespace
Aggressive cleanup at end of nodes or before closing tags
- Double normalization issue
Browser inserts
Gutenberg attempts conversion to raw text (JSON serialization)
Mapping fails → fallback to empty string ""
👉 Result: character is lost entirely
- Gutenberg input rules
Automatic transformations (typing / paste handling)
Interaction with RichText and normalization pipeline
- blockGap / layout engine
Dynamic spacing injection via blockGap
Resolved before styles → difficult to override
May interfere with or mask whitespace behavior
🌍 Scope
Observed across multiple WordPress installations
Reproduced on:
Chrome
Firefox
Independent of:
OS
theme
👉 This strongly suggests a Gutenberg core issue, not environment-specific
📉 Impact
Critical for editorial websites
Degradation of published content quality
High manual correction cost
Potential SEO impact (readability, UX)
❓ Questions
Is a fix currently planned or in progress in Gutenberg?
Is there any temporary patch or filter available?
Is it possible to disable aggressive whitespace normalization?
🛠️ Workarounds tested (not reliable)
Pasting as plain text → reduces issues but does not fully solve them
Manual proofreading → too time-consuming
CSS fixes → ineffective (issue affects content, not rendering)
📌 Conclusion
This appears to be a recent regression in the Gutenberg parsing / serialization pipeline, likely related to improper handling of non-breaking spaces (\u00A0).
The bug is difficult to isolate precisely, but clearly reproducible and affecting multiple production environments.
Thank you in advance for your help 🙏
Happy to provide additional tests or a reproducible environment if needed.
Change History (7)
#2
@
8 weeks ago
Not 100% confirmed at the moment, but it also seems to affect older articles published before the update.
#3
@
8 weeks ago
- Component changed from General to Editor
- Severity changed from critical to normal
Switching severity back to normal since this wasn't reported on broader environments/installs yet.
Would be nice to get other reproduction reports.
#4
@
7 weeks ago
Reproduction Report
Description
❌ This report can't validate whether the issue can be reproduced.
Environment
- WordPress: 7.1-alpha-62161-src
- PHP: 8.3.30
- Server: nginx/1.29.7
- Database: mysqli (Server: 8.4.8 / Client: mysqlnd 8.3.30)
- Browser: Chrome 146.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Steps Performed
- Copied content from Google Docs/Microsoft Word
- Added a new Paragraph block and pasted the copied content
- Saved the changes
- Verified that no spaces were missing between words
Actual Results
- ❌ Error condition couldn't be reproduced.
Additional Notes
- Tested using both Google Docs and Microsoft Word, but the issue could not be reproduced in either case
- Tried making multiple edits before and after pasting, as well as testing without any additional changes after pasting but no missing spaces were observed
- Restored an autosave version of the newly pasted content, but the issue still could not be reproduced
- Checked both in the editor and on the frontend; the text was copied and displayed correctly
Supplemental Artifacts
#5
@
7 weeks ago
Hello @devasheeshkaul thanks for trying to help ! We are continuing to try to find a simple way to reproduce the problem. However, in your test, this could not work because the problem only occurs between bold letters or between bold and regular letters.
#6
@
7 weeks ago
@testwp75 Can you confirm if you are seeing this with all plugins deactivated while using a default theme? Additionally, since you mentioned this is after copying fromm google docs and word, can you share some example documents that demonstrate this for you.
#7
@
6 weeks ago
Hey @testwp75, thanks for the additional information! I tried again by testing multiple bold text scenarios (both consecutive bold letters and bold text mixed with regular text), but I still wasn’t able to reproduce the issue. In all the cases, the content was pasted with the properly bolded text without any missing spacing, both in the editor and on the frontend.
As @jorbin mentioned, if you could share the example document, it would really help in testing this further in case we’re missing any crucial detail from the doc itself.


*appears after multiple saves or autosaves => appears after a save or autosave.