[buddypress-trac] [BuddyPress] #1326: Double-byte characters in post url turned to mess code

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Nov 11 09:13:43 UTC 2009

#1326: Double-byte characters in post url turned to mess code
  Reporter:  andrepan  |       Owner:                        
      Type:  task      |      Status:  closed                
  Priority:  major     |   Milestone:                        
Resolution:  fixed     |    Keywords:  bug, error, buddypress

Comment(by levinng):

 Hm... btw it just a interim solution, the problem consist two part.

 1. add_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 );
 Why call it twice in bp-activity-filters.php

 2. when parsing with bp_activity_filter_kses(wp_kses) in bp-activity-
 filters.php, I'd tried to echo $content before "return wp_kses( $content,
 $activity_allowedtags );" , however the echo-ed content  didn't contain
 any mess up character, It just messing the title link retrieve  by
 activity widget.

 3. When i remove all additional $activity_allowedtags in
 bp_activity_filter_kses like below

 function bp_activity_filter_kses( $content ) {
 global $allowedtags;

         $activity_allowedtags = $allowedtags;
         return wp_kses( $content, $activity_allowedtags );


 But the result still have those mess up code appears in link. I think it
 is already out of my knowledge.

 4. So I have a last try, I  changed the line 413 in /wp-include/kses.php




         return preg_replace_callback('%((<!--.*?(-->|$))|(<[^>]*^>))%',


 it could be fixed the problem in BP, but i've no idea if it suffer any
 side effects, I shouldn't touch wp core, because the defects didn't appear
 in WP alone.

Ticket URL: <http://trac.buddypress.org/ticket/1326#comment:8>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list