Index: typo3/sysext/cms/tslib/class.tslib_pagegen.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pagegen.php (revision 8049) +++ typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy) @@ -163,17 +163,11 @@ $GLOBALS['TSFE']->sWordRegEx=''; $GLOBALS['TSFE']->sWordList = t3lib_div::_GP('sword_list'); if (is_array($GLOBALS['TSFE']->sWordList)) { - $standAlone = trim(''.$GLOBALS['TSFE']->config['config']['sword_standAlone']); - $noMixedCase = trim(''.$GLOBALS['TSFE']->config['config']['sword_noMixedCase']); + $space = (!empty($GLOBALS['TSFE']->config['config']['sword_standAlone'])) ? '[[:space:]]' : ''; - $space = ($standAlone) ? '[[:space:]]' : ''; foreach ($GLOBALS['TSFE']->sWordList as $val) { - if (trim($val)) { - if (!$noMixedCase) { - $GLOBALS['TSFE']->sWordRegEx.= $space.sql_regcase(quotemeta($val)).$space.'|'; - } else { + if (strlen(trim($val)) > 0) { $GLOBALS['TSFE']->sWordRegEx.= $space.quotemeta($val).$space.'|'; - } } } $GLOBALS['TSFE']->sWordRegEx = preg_replace('/\|$/','',$GLOBALS['TSFE']->sWordRegEx); Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 8049) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -5012,7 +5012,11 @@ if ($GLOBALS['TSFE']->no_cache && $conf['sword'] && is_array($GLOBALS['TSFE']->sWordList) && $GLOBALS['TSFE']->sWordRegEx) { $newstring = ''; do { - $pieces = preg_split('/' . $GLOBALS['TSFE']->sWordRegEx . '/', $data, 2); + $pregSplitMode = 'i'; + if (isset($GLOBALS['TSFE']->config['config']['sword_noMixedCase']) && !empty($GLOBALS['TSFE']->config['config']['sword_noMixedCase'])) { + $pregSplitMode = ''; + } + $pieces = preg_split('/' . $GLOBALS['TSFE']->sWordRegEx . '/'.$pregSplitMode, $data, 2); $newstring.=$pieces[0]; $match_len = strlen($data)-(strlen($pieces[0])+strlen($pieces[1])); if (strstr($pieces[0],'<') || strstr($pieces[0],'>')) {