WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question

closed as off-topic by Pieter Goosen, kaiser Aug 4 '14 at 16:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

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

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