Skip to:
Content
Pages
Categories
Search
Top
Bottom

prevent bbpress from encoding & nbsp;


  • Tomcraft1980
    Member

    @tomcraft1980

    Hi there,

    I have the Problem, that in Code & nbsp; is encoded so the user doens’t see it anymore.

    Is there a way to tell bbpress to not encode & nbsp; or does this make other problems?

    Kind regards

    Tom

Viewing 2 replies - 1 through 2 (of 2 total)

  • Adam Harley
    Member

    @kawauso

    For some reason it doesn’t get escaped by anything. How weird. Okay, the hackiest way of doing it ever:

    function bb_escape_nbsp( $text ) {
    $text = str_replace ( ' ', '&amp ;nbsp;', $text );
    return $text;
    }
    add_filter('post_text', 'bb_escape_nbsp');
    add_filter('edit_text', 'bb_escape_nbsp');

    Take out the space between amp and ;


    Tomcraft1980
    Member

    @tomcraft1980

    Works great, THX!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.