--- class.t3lib_parsehtml_org.php 2011-11-02 10:50:08.962287998 +0100 +++ class.t3lib_parsehtml.php 2011-11-02 10:53:10.436344670 +0100 @@ -247,10 +247,13 @@ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ); } - - if (count($wrapArr) > 0) { - $marker = $wrapArr[0] . $marker . $wrapArr[1]; - } + + if (count($wrapArr) > 0) + $marker = $wrapArr[0]. $marker; + + if (count($wrapArr) > 1) + $marker.= $wrapArr[1]; + $content = str_replace($marker, $markContent, $content); } @@ -259,8 +262,15 @@ if (empty($wrap)) { $wrapArr = array('###', '###'); } - - $content = preg_replace('/' . preg_quote($wrapArr[0]) . '([A-Z0-9_|\-]*)' . preg_quote($wrapArr[1]) . '/is', '', $content); + + + $pattern=''; + if (count($wrapArr)>0) + $pattern.='/' . preg_quote($wrapArr[0]) . '([A-Z0-9_|\-]*)'; + if (count($wrapArr)>1) + $pattern.=preg_quote($wrapArr[1]); + $pattern.= . '/is'; + $content = preg_replace($pattern, '', $content); } }