--- class.t3lib_parsehtml_org.php 2011-11-02 10:50:08.962287998 +0100
+++ class.t3lib_parsehtml.php 2011-11-02 11:12:25.396311856 +0100
@@ -238,6 +238,12 @@
if (is_array($markContentArray)) {
$wrapArr = t3lib_div::trimExplode('|', $wrap);
+ /*if (count($wrapArr)<2){
+ $error = 'Missing marker part';
+ throw new Exception($error);
+ }*/
+
+
foreach ($markContentArray as $marker => $markContent) {
if ($uppercase) {
// use strtr instead of strtoupper to avoid locale problems with Turkish
@@ -247,10 +253,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 +268,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);
}
}