Skip to content

Commit c7867d3

Browse files
swissspidyclaude
andcommitted
Use a literal block fixture in the escaped style scenario
serialize_block() is missing from WordPress 5.0.0-5.0.7 and from the first releases of 5.1-5.3, while the feature runs from WordPress 5.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
1 parent d12d35a commit c7867d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎features/block-search.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Feature: Search posts by block usage
303303
"""
304304

305305
Scenario: Style names that are escaped when serialized are still found
306-
When I run `wp eval 'wp_insert_post( wp_slash( [ "post_title" => "Escaped style", "post_status" => "publish", "post_content" => serialize_block( [ "blockName" => "core/paragraph", "attrs" => [ "className" => "is-style-a&b" ], "innerBlocks" => [], "innerHTML" => "<p class=\"is-style-a&amp;b\">x</p>", "innerContent" => [ "<p class=\"is-style-a&amp;b\">x</p>" ] ] ) ] ) ); echo "done";'`
306+
When I run `wp eval 'wp_insert_post( wp_slash( [ "post_title" => "Escaped style", "post_status" => "publish", "post_content" => "<!-- wp:paragraph {\"className\":\"is-style-a\\u0026b\"} --><p class=\"is-style-a&amp;b\">x</p><!-- /wp:paragraph -->" ] ) ); echo "done";'`
307307
Then STDOUT should be:
308308
"""
309309
done

0 commit comments

Comments
 (0)