The problem is the Activity component only allows certain elements to be shown in the activity stream.
By default, <ol>
and <li>
are not among those whitelisted elements.
You can override this behavior with the following code snippet in your theme’s functions.php
file or via wp-content/plugins/bp-custom.php:
// Allow list-item element through
add_filter( 'bp_activity_allowed_tags', function( $retval ) {
$retval['ul'] = $retval['ol'] = $retval['li'] = array();
return $retval;
} );
I’ve also opened a ticket about this here:
https://buddypress.trac.wordpress.org/ticket/7538
Thanks for the quick support.
@r-a-y
Hello
Is there a method for group description page?
Because it does not work there.
Group descriptions are filtered at the time of saving, via wp_filter_kses()
, and at the time of display using bp_groups_filter_kses()
. https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-groups/bp-groups-filters.php#L35
It seems like a bug that we do different things at the time of save vs the time of display, but there you have it.
I’d suggest removing the groups_group_description_before_save
filter, replacing with bp_groups_filter_kses
, and then filtering bp_groups_filter_kses
to add allowed tags (as @r-a-y describes above). https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-groups/bp-groups-filters.php?marks=117#L87