Skip to:
Content

Ticket #7895: 7895.patch

File 7895.patch, 2.8 KB (added by imath, 12 months ago)
  • src/bp-templates/bp-nouveau/buddypress/members/single/profile/change-avatar.php

    diff --git src/bp-templates/bp-nouveau/buddypress/members/single/profile/change-avatar.php src/bp-templates/bp-nouveau/buddypress/members/single/profile/change-avatar.php
    index fa1b4e1e8..c922ab7c7 100644
     
    1515
    1616        <p class="bp-feedback info">
    1717                <span class="bp-icon" aria-hidden="true"></span>
    18                 <span class="bp-help-text"><?php esc_html_e( 'Your profile photo will be used on your profile and throughout the site. If there is a <a href="https://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress' ); ?></span>
     18                <span class="bp-help-text"><?php echo bp_nouveau_sanitize_feedback( __( 'Your profile photo will be used on your profile and throughout the site. If there is a <a href="https://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress' ) ); ?></span>
    1919        </p>
    2020
    2121        <form action="" method="post" id="avatar-upload-form" class="standard-form" enctype="multipart/form-data">
  • src/bp-templates/bp-nouveau/includes/functions.php

    diff --git src/bp-templates/bp-nouveau/includes/functions.php src/bp-templates/bp-nouveau/includes/functions.php
    index 711596337..bd710ef49 100644
    function bp_nouveau_set_nav_item_order( $nav = null, $order = array(), $parent_s 
    13911391
    13921392        return true;
    13931393}
     1394
     1395/**
     1396 * Sanitize the feedback output.
     1397 *
     1398 * @since 3.2.0
     1399 *
     1400 * @param  string $text The feedback message.
     1401 * @return string       The sanitized feedback message.
     1402 */
     1403function bp_nouveau_sanitize_feedback( $text ) {
     1404        foreach ( array( 'wp_kses_data', 'wp_unslash', 'wptexturize', 'convert_smilies', 'convert_chars' ) as $filter ) {
     1405                $text = call_user_func( $filter, $text );
     1406        }
     1407
     1408        return $text;
     1409}
  • src/bp-templates/bp-nouveau/includes/template-tags.php

    diff --git src/bp-templates/bp-nouveau/includes/template-tags.php src/bp-templates/bp-nouveau/includes/template-tags.php
    index ce2ad93f5..293a235ab 100644
    function bp_nouveau_template_message() { 
    203203                        $user_feedback = $bp_nouveau->user_feedback['message'];
    204204
    205205                        // @TODO: why is this treated differently?
    206                         foreach ( array( 'wp_kses_data', 'wp_unslash', 'wptexturize', 'convert_smilies', 'convert_chars' ) as $filter ) {
    207                                 $user_feedback = call_user_func( $filter, $user_feedback );
    208                         }
    209 
    210                         return '<p>' . $user_feedback . '</p>';
     206                        return '<p>' . bp_nouveau_sanitize_feedback( $user_feedback ) . '</p>';
    211207
    212208                } elseif ( ! empty( $bp_nouveau->template_message['message'] ) ) {
    213209                        /**