[buddypress-trac] [BuddyPress] #4506: shortcodes for code in forum post not working correctly

buddypress-trac noreply at wordpress.org
Tue Oct 23 16:59:41 UTC 2012


#4506: shortcodes for code in forum post not working correctly
--------------------------+------------------------------
 Reporter:  chouf1        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Groups        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by chouf1):

 Found a solution on the Net who works with syntaxhighlighter installed:
 Change bp-forums-template.php:1166
 Replace
 return apply_filters( 'bp_get_the_topic_post_content', stripslashes(
 $topic_template->post->post_text ) );
 by this
 return apply_filters( 'bp_get_the_topic_post_content',
 wp_specialchars_decode( $topic_template->post->post_text, ENT_QUOTES ) );

 And in theme's functions.php, add this to have correct < and > output
 remove_filter( 'bp_get_the_topic_post_content', 'bp_forums_filter_kses', 1
 );
 remove_filter( 'bp_get_the_topic_post_content', 'wptexturize' );

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4506#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list