Skip to content

Commit

Permalink
escape styles attribute in comment avatar (#36988)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Bravo <[email protected]>
  • Loading branch information
cbravobernal and Carlos Bravo authored Nov 30, 2021
1 parent 570751a commit 9724a3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/comment-author-avatar/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function render_block_core_comment_author_avatar( $attributes, $content, $block
)
);
if ( isset( $spacing_attributes ) ) {
return sprintf( '<div style="%1s">%2s</div>', $spacing_string, $avatar_block );
return sprintf( '<div style="%1s">%2s</div>', esc_attr( $spacing_string ), $avatar_block );
}
return sprintf( '<div>%1s</div>', $avatar_block );
}
Expand Down

0 comments on commit 9724a3f

Please sign in to comment.