Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Legacy PHPBB codes

edited January 2012 in Vanilla 2.0 - 2.8

After conversion from PHPBB3 to vanilla some months back, I noticed strange codes inside the posts. Upon closer inspection, I realized that these are codes that were injected into the posts and comments by the PHPBB3 system in order to facilitate the display of links and smileys.

I need to remove all these codes now. I need a suggestion of how this can be achieved. KIndly see the images below to have an idea of what I am talking about:

Thank you in advance

Tagged:

Best Answer

  • Options
    x00x00 MVP
    Answer ✓

    There are html comments, which are being converted into literal strings.

    HtmlLawed should remove comments

    do you have this in plugins/HtmLawed/classhtmlawed.php

      $Config = array(
       'anti_link_spam' => array('`.`', ''),
       'comment' => 1,
       'cdata' => 3,
       'css_expression' => 1,
       'deny_attribute' => 'on*',
       'elements' => '*-applet-form-input-textarea-iframe-script-style', // object, embed allowed
       'keep_bad' => 0,
       'schemes' => 'classid:clsid; href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; style: nil; *:file, http, https', // clsid allowed in class
       'valid_xml' => 2
      );
    

    See the comment an cdata settings

    grep is your friend.

Answers

  • Options
    UnderDogUnderDog MVP
    edited January 2012

    Ooh, you won't like my solution, but here we go.

    Select * from discussions -> catch it in an array
    For each array
    Get the discussion content
    Apply conversions for the smileys
    Maybe apply some more changes
    Post the discussion back into the database table
    

    Backup before you start on this task.

    There was an error rendering this rich post.

  • Options
    x00x00 MVP
    Answer ✓

    There are html comments, which are being converted into literal strings.

    HtmlLawed should remove comments

    do you have this in plugins/HtmLawed/classhtmlawed.php

      $Config = array(
       'anti_link_spam' => array('`.`', ''),
       'comment' => 1,
       'cdata' => 3,
       'css_expression' => 1,
       'deny_attribute' => 'on*',
       'elements' => '*-applet-form-input-textarea-iframe-script-style', // object, embed allowed
       'keep_bad' => 0,
       'schemes' => 'classid:clsid; href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; style: nil; *:file, http, https', // clsid allowed in class
       'valid_xml' => 2
      );
    

    See the comment an cdata settings

    grep is your friend.

Sign In or Register to comment.