Make WordPress Core

Ticket #56834: 56834.diff

File 56834.diff, 1022 bytes (added by zenaulislam, 4 years ago)

Created Patch

  • src/wp-includes/blocks/avatar.php

    diff --git a/src/wp-includes/blocks/avatar.php b/src/wp-includes/blocks/avatar.php
    index 9e20d81b64..f6e3f6a7ee 100644
    a b function render_block_core_avatar( $attributes, $content, $block ) {  
    127127                        $label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"';
    128128                }
    129129                // translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
    130                 $avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', $comment->comment_author_url, esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
     130                $avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
    131131        }
    132132        return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
    133133}