Opened 12 years ago
Closed 12 years ago
#4433 closed defect (bug) (wontfix)
Pre and code tag not working properly in topic answers
Reported by: | chouf1 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.6 |
Component: | Forums | Keywords: | reporter-feedback |
Cc: |
Description
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. else add_filter( '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 ?
Change History (5)
#2
@
12 years ago
- Keywords reporter-feedback added
Are we talking bbPress 1 or 2 here? (group forums or sitewide)
Here some code inserting tests
http://bp-fr.net/groupes/comment-faire-pour/forum/topic/test-insert-code/