#339 closed defect (bug) (fixed)
bp is displaying escape chars and stripping formatting in group forums
Reported by: | burtadsit | Owned by: | |
---|---|---|---|
Milestone: | Priority: | major | |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
This patch fixes the file bp-forums-filters.php to strip escape chars and put 'p' and 'br' tags back into the allowed tag stream.
`add_filter( 'bp_the_topic_post_content', 'bp_forums_filter_decode')
add_filter( 'bp_the_topic_latest_post_excerpt', bp_forums_filter_decode')`
Need to run at priority '1' to strip the escape chars.
global $allowedtags; $allowedtags['p'] = array(); $allowedtags['br'] = array();
The 'p' and 'br' tags are added to the $allowedtags
array since we are calling wp_filter_kses() which pays attention to that.
On the bbpress side of this the encoding being done for xmlrpc transport by buddypress needs to be undone on the bbpress side. Special chars are being stored in the db encoded. I couldn't figure out a way to decode them before they were stuffed in the db so I fixed it by decoding them on display in bbpress.
This workaround zip file includes a plugin for buddypress that does the above filter and tag mods. It also includes a bbpress plugin that does the decoding of special chars at display time in bbpress.
http://code.ourcommoninterest.org/2009/01/12/group-forums-fixes/
fix xmlrpc escape and format problems