Еще, как вариант, проблема может быть в следующем коде:
/**
* This function processes the text before showing for editing, etc
* Used for rebuilding after upgrade to 3.0
*
* @access public
* @param string Raw text
* @return string Converted text
*/
public function preEditParse( $txt="" )
{
//-----------------------------------------
// Before we start, strip newlines or we'll
// end up duplicating them
//-----------------------------------------
$txt = str_replace( "\n", "", $txt );
$txt = str_replace( "\r", "", $txt );
//-----------------------------------------
// Clean up BR tags
//-----------------------------------------
if ( !$this->parse_html OR $this->parse_nl2br )
{
$txt = str_replace( "<br>" , "\n", $txt );
$txt = str_replace( "<br .", "\n", $txt );
}
# Make EMO_DIR safe so the ^> regex works
$txt = str_replace( "<#EMO_DIR#>", "default", $txt );
# New emo
$txt = preg_replace( "#(\s)?<([^>]+?)emoid=\"(.+?)\"([^>]*?)".">(\s)?#is", "\\1\\3\\5", $txt );
# And convert it back again...
$txt = str_replace( "default", "<#EMO_DIR#>", $txt );
# Legacy
$txt = preg_replace( "#<!--emo&(.+?)-->.+?<!--endemo-->#", "\\1" , $txt );
# New (3.0)
$txt = $this->unconvertSmilies( $txt );
//-----------------------------------------
// Clean up nbsp
//-----------------------------------------
$txt = str_replace( ' ', "\t", $txt );
$txt = str_replace( ' ' , " ", $txt );
if ( $this->parse_bbcode )
{
//-----------------------------------------
// Custom bbcode...
//-----------------------------------------
$txt = preg_replace( "#<acronym title=[\"'](.+?)['\"]>(.+?)</acronym>#is", "[acronym=\"\\1\"]\\2[/acronym]", $txt );
$txt = preg_replace( "#<a href=[\"']index\.php\?automodule=blog(&|&)showentry=(.+?)['\"]>(.+?)</a>#is", "[entry=\"\\2\"]\\3[/entry]", $txt );
$txt = preg_replace( "#<a href=[\"']index\.php\?automodule=blog(&|&)blogid=(.+?)['\"]>(.+?)</a>#is", "[blog=\"\\2\"]\\3[/blog]", $txt );
$txt = preg_replace( "#<a href=[\"']index\.php\?act=findpost(&|&)pid=(.+?)['\"]>(.+?)</a>#is", "[post=\"\\2\"]\\3[/post]", $txt );
$txt = preg_replace( "#<a href=[\"']index\.php\?showtopic=(.+?)['\"]>(.+?)</a>#is", "[topic=\"\\1\"]\\2[/topic]", $txt );
$txt = preg_replace( "#<a href=[\"'](.*?)index\.php\?act=findpost(&|&)pid=(.+?)['\"]><\{POST_SNAPBACK\}></a>#is", "[snapback]\\3[/snapback]", $txt );
$txt = preg_replace( "#<div class=[\"']codetop['\"]>(.+?)</div><div class=[\"']codemain['\"] style=[\"']height:200px;white\-space:pre;overflow:auto['\"]>(.+?)</div>#is", "[codebox]\\2[/codebox]
", $txt );
$txt = preg_replace( "#<!--blog\.extract\.start-->(.+?)<!--blog\.extract\.end-->#is", "\\1", $txt );
$txt = preg_replace( "#(.+?)#is", "
\\1
", $txt );
//-----------------------------------------
// SQL
//-----------------------------------------
$txt = preg_replace_callback( "#<!--sql-->(.+?)<!--sql1-->(.+?)<!--sql2-->(.+?)<!--sql3-->#is", array( &$this, 'unconvert_sql'), $txt );
//-----------------------------------------
// HTML
//-----------------------------------------
$txt = preg_replace_callback( "#<!--html-->(.+?)<!--html1-->(.+?)<!--html2-->(.+?)<!--html3-->#is", array( &$this, 'unconvert_htm'), $txt );
//-----------------------------------------
// Images / Flash
//-----------------------------------------
$txt = preg_replace_callback( "#<!--Flash (.+?)-->.+?<!--End Flash-->#", array( &$this, 'unconvert_flash'), $txt );
$txt = preg_replace( "#]+?>#is" , "\[img\]\\1\[/img\]" , $txt );
//-----------------------------------------
// Email, URLs
//-----------------------------------------
$txt = preg_replace( "#(.+?)#s" , "\[email=\\1\]\\2\[/email\]" , $txt );
$txt = preg_replace( "#(.+?)#s" , "\[url=\"\\1\\2\"\]\\3\[/url\]" , $txt );
//-----------------------------------------
// Quote
//-----------------------------------------
$txt = preg_replace( "#<!--QuoteBegin-->(.+?)<!--QuoteEBegin-->#" , '' , $txt );
$txt = preg_replace( "#<!--QuoteBegin-{1,2}([^>]+?)\+([^>]+?)-->(.+?)<!--QuoteEBegin-->#", "" , $txt );
$txt = preg_replace( "#<!--QuoteBegin-{1,2}([^>]+?)\+-->(.+?)<!--QuoteEBegin-->#" , "" , $txt );
$txt = preg_replace( "#<!--QuoteEnd-->(.+?)<!--QuoteEEnd-->#" , '' , $txt );
//-----------------------------------------
// Super old quotes
//-----------------------------------------
$txt = preg_replace( "#\#i" , "", $txt );
//-----------------------------------------
// URL Inside Quote
//-----------------------------------------
$txt = preg_replace( "#\(.+?)\[\/url\]\]#i"' date=' "", str_replace( "\\", "", $txt ) );
//-----------------------------------------
// New quote
//-----------------------------------------
$txt = preg_replace_callback( "#<!--quoteo([^>]+?)?-->(.+?)<!--quotec-->#si", array( &$this, '_parse_new_quote'), $txt );
//-----------------------------------------
// Ident => Block quote
//-----------------------------------------
while( preg_match( "#
[indent](.+?)[/indent]
#is" , $txt ) )
{
$txt = preg_replace( "#
[indent](.+?)[/indent]
#is" , "
[indent]\\1[/indent]
", $txt );
}
//-----------------------------------------
// CODE
//-----------------------------------------
$txt = preg_replace( "#<!--c1-->(.+?)<!--ec1-->#", '[code]' , $txt );
$txt = preg_replace( "#<!--c2-->(.+?)<!--ec2-->#", '[/code]
', $txt );
//-----------------------------------------
// left, right, center
//-----------------------------------------
$txt = preg_replace( "#(.+?)#is" , "[\\1]\\2[/\\1]", $txt );
//-----------------------------------------
// Start off with the easy stuff
//-----------------------------------------
$txt = $this->parse_simple_tag_recursively( 'b' , 'b' , 0, $txt );
$txt = $this->parse_simple_tag_recursively( 'i' , 'i' , 0, $txt );
$txt = $this->parse_simple_tag_recursively( 'u' , 'u' , 0, $txt );
$txt = $this->parse_simple_tag_recursively( 'strike', 's' , 0, $txt );
$txt = $this->parse_simple_tag_recursively( 'sub' , 'sub', 0, $txt );
$txt = $this->parse_simple_tag_recursively( 'sup' , 'sup', 0, $txt );
//-----------------------------------------
// List headache
//-----------------------------------------
$txt = preg_replace( "#(\n){0,1}#" , "\\1\[list\]" , $txt );
$txt = preg_replace( "#(\n){0,1}#" , "\\1\[list=1\]" , $txt );
$txt = preg_replace( "#(\n){0,1}#" , "\\1\[list=\\2\]\n" , $txt );
$txt = preg_replace( "#(\n){0,1}#" , "\n\[*\]" , $txt );
$txt = preg_replace( "#(\n){0,1}(\n){0,1}#", "\n\[/list\]\\2" , $txt );
$txt = preg_replace( "#(\n){0,1}(\n){0,1}#", "\n\[/list\]\\2" , $txt );
//-----------------------------------------
// Opening style attributes
//-----------------------------------------
$txt = preg_replace( "#<!--sizeo:(.+?)-->(.+?)<!--/sizeo-->#" , "[size=\\1]" , $txt );
$txt = preg_replace( "#<!--coloro:(.+?)-->(.+?)<!--/coloro-->#" , "[color=\"\\1\"]", $txt );
$txt = preg_replace( "#<!--fonto:(.+?)-->(.+?)<!--/fonto-->#" , "[font=\"\\1\"]" , $txt );
$txt = preg_replace( "#<!--backgroundo:(.+?)-->(.+?)<!--/backgroundo-->#" , "[background=\\1]" , $txt );
//-----------------------------------------
// Closing style attributes
//-----------------------------------------
$txt = preg_replace( "#<!--sizec-->(.+?)<!--/sizec-->#" , "[/size]" , $txt );
$txt = preg_replace( "#<!--colorc-->(.+?)<!--/colorc-->#" , "[/color]", $txt );
$txt = preg_replace( "#<!--fontc-->(.+?)<!--/fontc-->#" , "[/font]" , $txt );
$txt = preg_replace( "#<!--backgroundc-->(.+?)<!--/backgroundc-->#", "[/background]" , $txt );
//-----------------------------------------
// LEGACY SPAN TAGS
//-----------------------------------------
//-----------------------------------------
// WYSI-Weirdness #9923464: Opera span tags
//-----------------------------------------
while ( preg_match( "#(.+?)#is", $txt ) )
{
$txt = preg_replace( "#(.+?)#is", "\[font=\\1\]\\2\[/font\]", $txt );
}
while ( preg_match( "#(.+?)#is", $txt ) )
{
$txt = preg_replace_callback( "#(.+?)#is" , array( &$this, 'unconvert_size' ), $txt );
}
while ( preg_match( "#(.+?)#is", $txt ) )
{
$txt = preg_replace( "#(.+?)#is" , "\[color=" . trim("\\1") . "\]\\2\[/color\]", $txt );
}
while ( preg_match( "#(.+?)#is", $txt ) )
{
$txt = preg_replace( "#(.+?)#is", "\[font=\"" . trim("\\1") . "\"\]\\2\[/font\]", $txt );
}
while ( preg_match( "#(.+?)#is", $txt ) )
{
$txt = preg_replace( "#(.+?)#is", "\[background=\\1\]\\2\[/font\]", $txt );
}
# Legacy
$txt = preg_replace( "#(.+?)#is" , "\[s\]\\1\[/s\]" , $txt );
//-----------------------------------------
// Tidy up the end quote stuff
//-----------------------------------------
$txt = preg_replace( "#(\[/quote\])\s*?
$txt = preg_replace( "#(\[/quote\])\s*?
\s*#si" , "\\1\n", $txt );
$txt = preg_replace( "#<!--EDIT\|.+?\|.+?-->#" , "" , $txt );
$txt = str_replace( "", "", $txt );
$txt = str_replace( "", "", $txt );
}
//-----------------------------------------
// Unconvert custom bbcode
//-----------------------------------------
$txt = $this->post_db_unparse_bbcode( $txt );
//-----------------------------------------
// Parse html
//-----------------------------------------
if ( $this->parse_html )
{
$txt = str_replace( "'", "'", $txt);
}
return trim(stripslashes($txt));
}