Skip to content

Commit

Permalink
Added wp_kses_post to Prefix and Suffix output of the Post Date block
Browse files Browse the repository at this point in the history
  • Loading branch information
TimBHowe committed May 23, 2024
1 parent 97ad933 commit 4d1ca75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/post-date/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function render_block_core_post_date( $attributes, $content, $block ) {

$prefix = '';
if ( isset( $attributes['prefix'] ) && $attributes['prefix'] ) {
$prefix = '<span class="wp-block-post-date__prefix">' . $attributes['prefix'] . '</span>';
$prefix = wp_kses_post( '<span class="wp-block-post-date__prefix">' . $attributes['prefix'] . '</span>' );
}

if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
Expand All @@ -59,7 +59,7 @@ function render_block_core_post_date( $attributes, $content, $block ) {

$suffix = '';
if ( isset( $attributes['suffix'] ) && $attributes['suffix'] ) {
$suffix = '<span class="wp-block-post-date__suffix">' . $attributes['suffix'] . '</span>';
$suffix = wp_kses_post( '<span class="wp-block-post-date__suffix">' . $attributes['suffix'] . '</span>' );
}

return sprintf(
Expand Down

0 comments on commit 4d1ca75

Please sign in to comment.