Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to modify the Group Description field on Buddypress Groups so that they can take HTML but Buddypress has filters to prevent this.

I used this;

remove_filter( 'bp_get_group_description', 'bp_groups_filter_kses', 1 ); remove_filter( 'groups_group_description_before_save', 'wp_filter_kses', 1 );

These are the filters applied: https://buddypress.trac.wordpress.org/browser/tags/1.5.4/bp-groups/bp-groups-filters.php I experimented with removing them and was able to get the form to accept HTML.

BUT, the problem is if someone enteres broken html and leaves a closing tag out for example it breaks the page. I put it in protective Tags so the page wont break but the form itself can be broken with bad html being used in the form.

So my question is, is there a way to do error checking on the html and prevent open tags and bad code from being submitted?

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

The key filter is force_balance_tags. Don't remove that one, as it's responsible for making sure that HTML tags are closed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.