Skip to content

Commit

Permalink
Update block bindings to use wp_kses_post for block content (#58055)
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Jan 23, 2024
1 parent 3ff31f8 commit 987265a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function replace_html( $block_content, $block_name, $block_attr, $source_
foreach ( $selector_attribute_names as $name ) {
$selector_attrs[ $name ] = $block_reader->get_attribute( $name );
}
$selector_markup = "<$selector>" . esc_html( $source_value ) . "</$selector>";
$selector_markup = "<$selector>" . wp_kses_post( $source_value ) . "</$selector>";
$amended_content = new WP_HTML_Tag_Processor( $selector_markup );
$amended_content->next_tag();
foreach ( $selector_attrs as $attribute_key => $attribute_value ) {
Expand Down

0 comments on commit 987265a

Please sign in to comment.