Skip to content

Commit

Permalink
Post Author: Switch byline to use kses instead of esc_html so that ri…
Browse files Browse the repository at this point in the history
…ch text elements are rendered correctly (#40776)
  • Loading branch information
andrewserong authored May 4, 2022
1 parent 1b91575 commit cf358f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/post-author/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function render_block_core_post_author( $attributes, $content, $block ) {
return sprintf( '<div %1$s>', $wrapper_attributes ) .
( ! empty( $attributes['showAvatar'] ) ? '<div class="wp-block-post-author__avatar">' . $avatar . '</div>' : '' ) .
'<div class="wp-block-post-author__content">' .
( ! empty( $byline ) ? '<p class="wp-block-post-author__byline">' . esc_html( $byline ) . '</p>' : '' ) .
( ! empty( $byline ) ? '<p class="wp-block-post-author__byline">' . wp_kses_post( $byline ) . '</p>' : '' ) .
'<p class="wp-block-post-author__name">' . get_the_author_meta( 'display_name', $author_id ) . '</p>' .
( ! empty( $attributes['showBio'] ) ? '<p class="wp-block-post-author__bio">' . get_the_author_meta( 'user_description', $author_id ) . '</p>' : '' ) .
'</div>' .
Expand Down

0 comments on commit cf358f7

Please sign in to comment.