Skip to:
Content

BuddyPress.org

Changeset 13020


Ignore:
Timestamp:
07/17/2021 10:55:24 AM (5 years ago)
Author:
imath
Message:

Groups Block: the avatar URL is the src attribute of the img tag

The alt attribut was wrongly used & the alternative text for the image was used into the src attribute. Let's make sure everything goes at the right place.

NB: this commit also improve escaping for the alt attribute of the Group Block.

Fixes #8531

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-blocks.php

    r13004 r13020  
    9494                        esc_url( $avatar ),
    9595                        /* Translators: %s is the group's name. */
    96                         sprintf( esc_html__( 'Group Profile photo of %s', 'buddypress' ), $group_name )
     96                        sprintf( esc_attr__( 'Group Profile photo of %s', 'buddypress' ), esc_html( $group_name ) )
    9797                );
    9898        }
     
    246246                                </div>',
    247247                                esc_url( $group_link ),
    248                                 /* Translators: %s is the group's name. */
    249                                 sprintf( esc_attr__( 'Group Profile photo of %s', 'buddypress' ), esc_html( $group->name ) ),
    250248                                esc_url(
    251249                                        bp_core_fetch_avatar(
     
    257255                                                )
    258256                                        )
    259                                 )
     257                                ),
     258                                /* Translators: %s is the group's name. */
     259                                sprintf( esc_attr__( 'Group Profile photo of %s', 'buddypress' ), esc_html( $group->name ) )
    260260                        );
    261261                }
Note: See TracChangeset for help on using the changeset viewer.