Project

General

Profile

Bug #31478 » bug_31478.diff

Tim Wentzlau, 2011-11-02 11:16

View differences:

class.t3lib_parsehtml.php 2011-11-02 11:12:25.396311856 +0100
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
......
'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);
}
......
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);
}
}
(2-2/2)