[wp-trac] [WordPress Trac] #63917: Block attributes cannot end in "\"
WordPress Trac
noreply at wordpress.org
Wed Sep 3 07:26:55 UTC 2025
#63917: Block attributes cannot end in "\"
--------------------------+--------------------
Reporter: jonsurrell | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.9
Component: Editor | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+--------------------
- Create a new post `/wp-admin/post-new.php`.
- Add a "More" block (`/more`).
- Replace the default text with the backslash character: `\`.
Check the editor to reveal this serialized block:
{{{#!xml
<!-- wp:more {"customText":"\\u0022} -->
<!--more \-->
<!-- /wp:more -->
}}}
Notice the `customText` string is invalid, it's missing a closing `"` and
does not represent the intended attribute value.
When the post is saved and loaded, the custom text (and any other
attributes) are lost due to invalid JSON encoding.
-----
This is a companion to the issue reported in
[https://github.com/WordPress/gutenberg/issues/16508 GB#16508].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63917>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list