[buddypress-trac] [BuddyPress] #4433: Pre and code tag not working properly in topic answers

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Aug 14 10:05:27 UTC 2012

#4433: Pre and code tag not working properly in topic answers
 Reporter:  chouf1        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Forums        |    Version:  1.6
 Severity:  normal        |   Keywords:
 WP 3.4.1
 BP 1.6.1 multisite...

 Topics can contain some code if we use backsticks or pre or code tags.
 This works correctly. But if we send an answer to a topic by inserting
 code, we became a blank page.

 To test this, i used this exerpt of BP code. I created a topic containing
 it. Tested with backsticks, code and pre: OK
 When throwing the same code into a answer, i got a blank page.

 $q = $wpdb->prepare( "INSERT INTO {$bp->activity->table_name} ( user_id,
 component, type, action, content, primary_link, date_recorded, item_id,
 secondary_item_id, hide_sitewide, is_spam ) VALUES ( %d, %s, %s, %s, %s,
 %s, %s, %s, %s, %d, %d )", $this->user_id, $this->component, $this->type,
 $this->action, $this->content, $this->primary_link, $this->date_recorded,
 $this->item_id, $this->secondary_item_id, $this->hide_sitewide,
 $this->is_spam );

                 if ( false === $wpdb->query( $q ) )
                         return false;

                 // If this is a new activity item, set the $id property
                 if ( empty( $this->id ) )
                         $this->id = $wpdb->insert_id;

                 // If an existing activity item, prevent any changes to
 the content generating new @mention notifications.
 'bp_activity_at_name_do_notifications', '__return_false' );

 When i try to insert only this piece of code, it shows correctly in a
 answer with pre and/or code tag:

 if ( false === $wpdb->query( $q ) )
                         return false;

 Does this mean that there is a kind of multiline code filtering somewhere

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4433>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list