Skip to:
Content

BuddyPress.org

Ticket #3146: patch.diff

File patch.diff, 2.2 KB (added by calvin_42, 14 years ago)

Patch

  • bp-xprofile/bp-xprofile-classes.php

    Class BP_XProfile_Group { 
    2424                        return false;
    2525
    2626                $this->id = $group->id;
    27                 $this->name = $group->name;
    28                 $this->description = $group->description;
     27                $this->name = stripslashes($group->name);
     28                $this->description = stripslashes($group->description);
    2929                $this->can_delete = $group->can_delete;
    3030        }
    3131
    Class BP_XProfile_ProfileData { 
    750750                                $result = $wpdb->query( $wpdb->prepare( "UPDATE {$bp->profile->table_name_data} SET value = %s, last_updated = %s WHERE user_id = %d AND field_id = %d", $this->value, $this->last_updated, $this->user_id, $this->field_id ) );
    751751
    752752                        // Data removed, delete the entry.
    753                         elseif ( $this->exists() && empty( $this->value ) )                             
     753                        elseif ( $this->exists() && empty( $this->value ) )
    754754                                $result = $this->delete();
    755755
    756756                        else
  • bp-xprofile/bp-xprofile-filters.php

     
    22
    33/* Apply WordPress defined filters */
    44
     5add_filter( 'bp_get_the_profile_group_name',          'wp_filter_kses', 1 );
     6add_filter( 'bp_get_the_profile_group_description',   'wp_filter_kses', 1 );
    57add_filter( 'bp_get_the_profile_field_value',         'wp_filter_kses', 1 );
    68add_filter( 'bp_get_the_profile_field_name',          'wp_filter_kses', 1 );
    79add_filter( 'bp_get_the_profile_field_edit_value',    'wp_filter_kses', 1 );
    add_filter( 'bp_get_the_profile_field_value', 'wpautop' ); 
    1416add_filter( 'bp_get_the_profile_field_value',         'make_clickable'     );
    1517add_filter( 'bp_get_the_profile_field_value',         'force_balance_tags' );
    1618
     19add_filter( 'bp_get_the_profile_group_name',          'stripslashes' );
     20add_filter( 'bp_get_the_profile_group_description',   'stripslashes' );
    1721add_filter( 'bp_get_the_profile_field_value',         'stripslashes' );
    1822add_filter( 'bp_get_the_profile_field_edit_value',    'stripslashes' );
    1923add_filter( 'bp_get_the_profile_field_name',          'stripslashes' );