Skip to:
Content

BuddyPress.org

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's profile 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 @DJPaul
12 years ago

  • Keywords reporter-feedback added

Are we talking bbPress 1 or 2 here? (group forums or sitewide)

#3 @boonebgorges
12 years ago

If it's bbPress 1, has it ever worked? ie, is this a regression? If not, I'm tempted to say wontfix, unless someone provides a simple, fully backward compatible patch - fixing bbPress 1.x is not a great use of our limited dev time.

#4 @DJPaul
12 years ago

chouf1, can you confirm if you found this issue on bbPress 1?

#5 @boonebgorges
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I'm closing as wontfix. No more non-critical support for bbPress 1.x. If you can provide a patch, please reopen.

Note: See TracTickets for help on using tickets.