[wp-trac] [WordPress Trac] #64944: Generated Excerpts - Missing white space when stripping <br>s generated in paragraph block, verse block, etc.
WordPress Trac
noreply at wordpress.org
Thu Apr 9 06:45:54 UTC 2026
#64944: Generated Excerpts - Missing white space when stripping <br>s generated in
paragraph block, verse block, etc.
--------------------------------------+-----------------------
Reporter: addiestavlo | Owner: audrasjb
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 7.1
Component: Formatting | Version: 5.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Changes (by gaisma22):
* keywords: has-patch has-unit-tests needs-testing => has-patch has-unit-
tests
Comment:
== Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11352
=== Environment
- WordPress: 7.0-beta6-62085-src
- PHP: 8.3.30
- Server: nginx/1.29.7
- Database: MySQL 8.4.8
- Browser: Brave
- OS: Ubuntu 24.04
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None
- Plugins: None
=== Steps Taken
1. Created a new post using a Verse block with three lines
separated by Enter.
2. Published without a custom excerpt.
3. Checked the generated excerpt via the REST API at
`/wp-json/wp/v2/posts/6`.
**Before patch:** Words from adjacent lines were stuck together
with no spaces. e.g. "this is line onethis is line two"
4. Created a new post with the same steps after applying PR #11352.
Checked `/wp-json/wp/v2/posts/9`.
**After patch:** Words are correctly separated by spaces.
e.g. "this is line one this is line two this is line three"
✅ Patch is solving the problem
=== Expected Result
When WordPress generates an automatic excerpt from a post using a Verse
block or Paragraph block with shift+enter line breaks, words from adjacent
lines should be separated by spaces.
=== Additional Notes
1. Bug confirmed on WordPress 7.0-beta6. The br tags in Verse
block content were stripped without preserving word boundaries,
causing words from adjacent lines to concatenate in the
generated excerpt.
2. Removing **`needs-testing`** as patch resolves the issue on
WordPress 7.0-beta6-62085-src.
=== Screenshots/Screencast with results
**Before Patch:**
[[Image(https://i.ibb.co/60Q5zz13/before-excerpt.png)]]
**After Patch:**
[[Image(https://i.ibb.co/j9jNbKWZ/after-excerpt.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64944#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list