Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/03/2019 05:27:08 PM (6 years ago)
Author:
imath
Message:

More constistent escaping in Activity action strings

This commit is also fixing a regression introduced in version 4.3.0 about activity streams secondary avatars.

Fixes #8090 (trunk)

File:
1 edited

Legend:

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

    r12366 r12393  
    7979    $group_link = '<a href="' . esc_url( bp_get_group_permalink( $group ) ) . '">' . esc_html( $group->name ) . '</a>';
    8080
    81     $action = sprintf( __( '%1$s created the group %2$s', 'buddypress'), $user_link, $group_link );
     81    $action = sprintf( esc_html__( '%1$s created the group %2$s', 'buddypress'), $user_link, $group_link );
    8282
    8383    /**
     
    107107    $group_link = '<a href="' . esc_url( bp_get_group_permalink( $group ) ) . '">' . esc_html( $group->name ) . '</a>';
    108108
    109     $action = sprintf( __( '%1$s joined the group %2$s', 'buddypress' ), $user_link, $group_link );
     109    $action = sprintf( esc_html__( '%1$s joined the group %2$s', 'buddypress' ), $user_link, $group_link );
    110110
    111111    // Legacy filters (do not follow parameter patterns of other activity
     
    154154    // No changed details were found, so use a generic message.
    155155    if ( empty( $changed ) ) {
    156         $action = sprintf( __( '%1$s updated details for the group %2$s', 'buddypress' ), $user_link, $group_link );
     156        $action = sprintf( esc_html__( '%1$s updated details for the group %2$s', 'buddypress' ), $user_link, $group_link );
    157157
    158158    // Name and description changed - to keep things short, don't describe changes in detail.
    159159    } elseif ( isset( $changed['name'] ) && isset( $changed['description'] ) ) {
    160         $action = sprintf( __( '%1$s changed the name and description of the group %2$s', 'buddypress' ), $user_link, $group_link );
     160        $action = sprintf( esc_html__( '%1$s changed the name and description of the group %2$s', 'buddypress' ), $user_link, $group_link );
    161161
    162162    // Name only.
    163163    } elseif ( ! empty( $changed['name']['old'] ) && ! empty( $changed['name']['new'] ) ) {
    164         $action = sprintf( __( '%1$s changed the name of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['name']['old'] ), esc_html( $changed['name']['new'] ) );
     164        $action = sprintf( esc_html__( '%1$s changed the name of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['name']['old'] ), esc_html( $changed['name']['new'] ) );
    165165
    166166    // Description only.
    167167    } elseif ( ! empty( $changed['description']['old'] ) && ! empty( $changed['description']['new'] ) ) {
    168         $action = sprintf( __( '%1$s changed the description of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['description']['old'] ), esc_html( $changed['description']['new'] ) );
     168        $action = sprintf( esc_html__( '%1$s changed the description of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['description']['old'] ), esc_html( $changed['description']['new'] ) );
    169169
    170170    } elseif ( ! empty( $changed['slug']['old'] ) && ! empty( $changed['slug']['new'] ) ) {
    171         $action = sprintf( __( '%1$s changed the permalink of the group %2$s.', 'buddypress' ), $user_link, $group_link );
     171        $action = sprintf( esc_html__( '%1$s changed the permalink of the group %2$s.', 'buddypress' ), $user_link, $group_link );
    172172
    173173    }
Note: See TracChangeset for help on using the changeset viewer.