Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/20/2015 04:08:00 PM (11 years ago)
Author:
johnjamesjacoby
Message:

All: make sure URLs are escaped (2.2 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/src/bp-activity/bp-activity-functions.php

    r9384 r9773  
    13671367
    13681368    if ( is_multisite() ) {
    1369         $blog_link = '<a href="' . $blog_url . '">' . get_blog_option( $activity->item_id, 'blogname' ) . '</a>';
     1369        $blog_link = '<a href="' . esc_url( $blog_url ) . '">' . get_blog_option( $activity->item_id, 'blogname' ) . '</a>';
    13701370
    13711371        if ( ! empty( $bp->activity->track[ $activity->type ]->new_post_type_action_ms ) ) {
    13721372            $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action_ms, $user_link, $post_url, $blog_link );
    13731373        } else {
    1374             $action = sprintf( _x( '%1$s wrote a new <a href="%2$s">item</a>, on the site %3$s', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, $post_url, $blog_link );
     1374            $action = sprintf( _x( '%1$s wrote a new <a href="%2$s">item</a>, on the site %3$s', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, esc_url( $post_url ), $blog_link );
    13751375        }
    13761376    } else {
     
    13781378            $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action, $user_link, $post_url );
    13791379        } else {
    1380             $action = sprintf( _x( '%1$s wrote a new <a href="%2$s">item</a>', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, $post_url );
     1380            $action = sprintf( _x( '%1$s wrote a new <a href="%2$s">item</a>', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, esc_url( $post_url ) );
    13811381        }
    13821382    }
Note: See TracChangeset for help on using the changeset viewer.