Skip to:

Opened 12 years ago

Closed 11 years ago

#4496 closed defect (bug) (no action required)

public profile fields showing html code...

Reported by: nitestop's profile nitestop Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.7
Component: Extended Profile Keywords: needs-patch dev-feedback


I am running buddypress with huddle theme and public profile content is showing up as html code as opposed to the text entered in the profile fields. Can someone help with this? I am not sure how to fix the bug.
here is the a site profile ex:

Change History (5)

#1 @boonebgorges
12 years ago

  • Component changed from Members to XProfile
  • Severity changed from critical to normal

Can you test on the default theme to see whether the problem is theme-related?

Did the problem just arise after upgrading to BP 1.6?

What other BP plugins are you using?

#2 @SlothLoveChunk
12 years ago

I know this is probably not a ton of help, but I can confirm this is happening on my site as well (and yes, it started with 1.6). I am running a custom theme however. This wasn't an issue prior to 1.6.

I'm not sure if it's related, but I will mention it because it happened at the same time. Your older solutions for allowing certain BP profile fields to be linked/unlinked does not work post 1.6. See


I specifically used the filter below to remove all HTML except for what was explicitly defined in $allowedtags; however, this doesn't work anymore (now I just see all HTML).

function cpfb_unlink_fields( $field_value ) {
    $no_link_fields = array( // Enter the field ID of any field that you want to appear as plain, non-clickable text. Don't forget to separate with commas.

        'Nickname' 	,
        'About Me' 	,


    $allowedtags = '<p><ul><li><b><strong>';
    if (checkUserRole('administrator'))
        $allowedtags .= '<a>';
    $bp_this_field_name = bp_get_the_profile_field_name();

    if ( in_array( $bp_this_field_name, $no_link_fields ) )
            $field_value = strip_tags( $field_value, $allowedtags );
    return $field_value;
add_filter( 'bp_get_the_profile_field_value', 'cpfb_unlink_fields', 998, 1 );

#3 @DJPaul
11 years ago

  • Milestone changed from Awaiting Review to Future Release

Moving to future release for further investigation

#4 @will_c
11 years ago

  • Keywords needs-patch dev-feedback added
  • Version changed from 1.6 to 1.7

I can confirm this same behavior using WP 3.5 and BP 1.7 using the Twenty Twelve theme and the bp-default theme. There seems to be some conflict with the 'bp_get_the_profile_field_value' filter. I was able to fix it by echoing the $field_value directly within the cpfb_add_social_networking_links() function and only returning the field value if it's not a social networking field.

I'm not sure this is the best solution, but it seems to work. It seems that others are being affected by a similar problem as well:

#5 @boonebgorges
11 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

It appears that this is a problem with Custom Profile Filters for BuddyPress, not a BP core problem. We did change the order in which filters are added in BP 1.6 (because of some security issues), and it's possible that the CPFB filters were not adjusted accordingly. I can try to look at this, but it's not appropriate for a BP core ticket, so I'm closing.

If it turns out that this is actually a BP core issue, please reopen with details.

Note: See TracTickets for help on using tickets.