Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Slash text issue in 1.0-alpha-6, have searched


defue
Member

@defue

I’ve found a solution for this. You need to edit bbpress/bb-includes/functions.bb-posts.php and replace the function bb_get_post (it is the first function in file) with

function bb_get_post( $post_id ) {
global $bbdb;
$post_id = (int) $post_id;
if ( false === $post = wp_cache_get( $post_id, 'bb_post' ) ) {
$post = $bbdb->get_row( $bbdb->prepare( "SELECT * FROM $bbdb->posts WHERE post_id = %d", $post_id ) );
$post = bb_append_meta( $post, 'post' );
wp_cache_set( $post_id, $post, 'bb_post' );
}
//here is the only new line for stripping slashes
$post->post_text = stripslashes($post->post_text);
return $post;
}

Not sure that it is the elegant solution but it works for me.

Skip to toolbar