Lists in imported posts show formating (i.e. <LI> </LI> ) symbols without the actual

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jcard
    Member
    • Jun 2010
    • 32

    Lists in imported posts show formating (i.e. <LI> </LI> ) symbols without the actual

    Still testing and going through all aspects.

    Noticed that any posts that had lists with bullets are now instead displayed with the HTML format symbols but not actually formated.

    For example, what is in the imported post is:

    <UL><LI>Uninstall the optional add-on or plugin</LI><LI>Download the latest version from blahblahblah </LI><LI>And install.
    </LI>[/list]

    What should look like instead:
    • Uninstall the optional add-on or plugin
    • Download the latest version from blahblahblabh
    • And install.
    What would have caused this?
    And how do I have this fixed in ImpEx before doing my live import?


    - Joyce
  • sexycoolfun
    Member
    • Jun 2010
    • 42
    • 4.0.0

    #2
    put these script in 000.php under your function XXX_html($text) where XXX is your module folder name
    Code:
    $text = str_replace('<OL>', '[list=1@]', $text);
    $text = str_replace('</OL>', '[/list@]', $text);
    $text = preg_replace('/<LI>(.*)<\/LI>/siU', '[*]$1', $text);
    $text = str_replace('<UL>', '[list@]', $text);
    $text = str_replace('</UL>', '[/list@]', $text);
     
    //and remove any `@` in the code above.

    Comment

    Related Topics

    Collapse

    Working...