Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/10/2015 07:39:37 PM (10 years ago)
Author:
djpaul
Message:

xprofile admin: fix handling of slashes in xprofile group name/desc

Add filters to parts of the xprofile wp-admin templates so we're
running group description and name through the same output filters that
are used in the front-end template parts (for stripslashes).

Also adds a stripslashes to profile group name and description
before_save filters to fix the root issue. By keeping the existing
on-display stripslashes, we maintain backwards compatibility.

Fixes #6081

Props mahype, djpaul

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-filters.php

    r10203 r10239  
    5959add_filter( 'xprofile_group_description_before_save', 'wp_filter_kses' );
    6060
     61add_filter( 'xprofile_group_name_before_save',         'stripslashes' );
     62add_filter( 'xprofile_group_description_before_save',  'stripslashes' );
     63
    6164// Save fields.
    6265add_filter( 'xprofile_field_name_before_save',         'wp_filter_kses' );
     
    6467add_filter( 'xprofile_field_description_before_save',  'wp_filter_kses' );
    6568add_filter( 'xprofile_field_order_by_before_save',     'wp_filter_kses' );
     69
    6670add_filter( 'xprofile_field_is_required_before_save',  'absint' );
    6771add_filter( 'xprofile_field_field_order_before_save',  'absint' );
Note: See TracChangeset for help on using the changeset viewer.