Skip to:
Content
Pages
Categories
Search
Top
Bottom

HTML tags in topics posts

Viewing 10 replies - 1 through 10 (of 10 total)
  • I have found the problem. bbConverter has imported all the first topic posts from my old forum to bbpress 2 with small modification: all “” characters were replaced with “<” and “>” (probably to remove HTML tags). I have resolved the issue by following code in my bbpress-functions.php file:

    add_filter("bbp_get_reply_content", "ps_bbp_get_reply_content");
    function ps_bbp_get_reply_content ($content) {
    $content = str_replace("&lt;","",$content);
    return $content;
    }
    

    Sorry, for some reason, one row was removed from the code. Here is the complete code. Additionally, the characters which were replaced by bbconvertor were replaced by the bbpress.org/forums reply content as well…:-) But you can see from the code what was replaced with what.:-)

    add_filter("bbp_get_reply_content", "ps_bbp_get_reply_content");
    function ps_bbp_get_reply_content ($content) {
    $content = str_replace("&lt;","",$content);
    return $content;
    }
    

    I do not know whar is happening… the right code again, trying it without “code” formatting…

    add_filter(“bbp_get_reply_content”, “ps_bbp_get_reply_content”);
    function ps_bbp_get_reply_content ($content) {
    $content = str_replace(“<“,””,$content);
    return $content;
    }

    What the hell! This row is still being removed by the local bbpress… grrrr.
    $content = str_replace(“>”,”>”,$content);

    Add it in front of the “return” row.

    This is a known issue for phpBB & Invision forums and the way it looks at the BBCode as its being imported, we are hoping to get this fixed for bbPress 2.2.

    You can see more details on the problems here https://bbpress.trac.wordpress.org/ticket/1884

    OMG! :-(( You still can not see the right code.:-( This bbpress is filtering some strings… I will spell the strings in “”, you should write the code without spaces.

    $content = str_replace(“& l t ;”,”<“,$content);
    $content = str_replace(“& g t ;”,”>”,$content);

    Hopefully I will succeed this (and last) time.:-)


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Once you get it right, I’ll delete your other posts.


    apet083
    Participant

    @apet083

    Hi I still have this problem even after upgrading to bbPress 2.2. My posts still have and tags all through them!

    I used bbConverter to convert the standalone bbPress forum to the new plugin version 2.1.

    Here is an example of what my posts look like:
    Great article in the Southland Times today about Earthlore:

    The replies are formatted fine. The fix mentioned above didn’t work for me, and I don’t want to edit the bb core files because they will just get wiped in the next update. Is there anything I can do??

    Thanks


    apet083
    Participant

    @apet083

    Sorry the p tags were obviously not displayed:

    <ptag Great article in the Southland Times today about Earthlore: //endptag

    Also have some br's in the posts.

    I tried using the built in forum converter but that just said "Starting conversion" and hung there for over 30 minutes so I stopped it and did bbConverter again without any luck…


    apet083
    Participant

    @apet083

    @viktora you are a genius! I used your fix but changed the double quotes to single quotes and that worked!! THANK YOU!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar