Skip to content

Commit

Permalink
Editor: Avoid double escaping on value passed for attribute in HTML t…
Browse files Browse the repository at this point in the history
…ag processor

Fix for the Block Bindings processing.
See #5888 (comment).

Props: czapla, dmsnell, gziolo.



git-svn-id: https://develop.svn.wordpress.org/trunk@57561 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
gziolo committed Feb 8, 2024
1 parent ae3ec69 commit fd8c730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-block.php
Expand Up @@ -376,7 +376,7 @@ private function replace_html( string $block_content, string $attribute_name, $s
) ) {
return $block_content;
}
$amended_content->set_attribute( $block_type->attributes[ $attribute_name ]['attribute'], esc_attr( $source_value ) );
$amended_content->set_attribute( $block_type->attributes[ $attribute_name ]['attribute'], $source_value );
return $amended_content->get_updated_html();
break;

Expand Down

0 comments on commit fd8c730

Please sign in to comment.