[wp-trac] [WordPress Trac] #64967: Bug report – Whitespace / non-breaking spaces removed after save in Gutenberg
WordPress Trac
noreply at wordpress.org
Fri Mar 27 15:19:17 UTC 2026
#64967: Bug report – Whitespace / non-breaking spaces removed after save in
Gutenberg
--------------------------+-----------------------------
Reporter: testwp75 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: critical | Keywords:
Focuses: |
--------------------------+-----------------------------
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:
1. Trim / DOM cleanup conflict
Some functions treat \u00A0 as removable whitespace
Aggressive cleanup at end of nodes or before closing tags
2. Double normalization issue
Browser inserts
Gutenberg attempts conversion to raw text (JSON serialization)
Mapping fails → fallback to empty string ""
👉 Result: character is lost entirely
3. Gutenberg input rules
Automatic transformations (typing / paste handling)
Interaction with RichText and normalization pipeline
4. 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64967>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list