Skip to:
Content

BuddyPress.org

Changeset 9791


Ignore:
Timestamp:
04/23/2015 03:13:49 PM (6 years ago)
Author:
johnjamesjacoby
Message:

The esc_url() function does an adequate job of preparing URLs for output to the browser; there is no need to also call esc_attr() on the results. Fixes #6390.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r9772 r9791  
    12751275     */
    12761276    function get_views() {
    1277         $url_base = bp_get_admin_url( 'admin.php?page=bp-activity' ); ?>
     1277        $url_base = add_query_arg( array( 'page' => 'bp-activity' ), bp_get_admin_url( 'admin.php' ) ); ?>
    12781278
    12791279        <ul class="subsubsub">
    1280             <li class="all"><a href="<?php echo esc_attr( esc_url( $url_base ) ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
    1281             <li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $url_base ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
     1280            <li class="all"><a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
     1281            <li class="spam"><a href="<?php echo esc_url( add_query_arg( array( 'activity_status' => 'spam' ), $url_base ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
    12821282
    12831283            <?php
  • trunk/src/bp-core/classes/class-bp-walker-nav-menu.php

    r9585 r9791  
    182182
    183183        // Add href attribute
    184         $attributes = ! empty( $item->link ) ? ' href="' . esc_attr( esc_url( $item->link ) ) . '"' : '';
     184        $attributes = ! empty( $item->link ) ? ' href="' . esc_url( $item->link ) . '"' : '';
    185185
    186186        // Construct the link
Note: See TracChangeset for help on using the changeset viewer.