Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 7370) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -4308,11 +4308,16 @@ if (($strLen + $thisStrLen > $absChars)) { $croppedOffset = $offset; $cropPosition = $absChars - $strLen; + // The snippet "&[^&\s;]{2,7};" in the RegEx below represents entities. + $patternMatchEntityAsSingleChar = '(&[^&\s;]{2,7};|.)'; if ($crop2space) { - $cropRegEx = $chars < 0 ? '#(?<=\s)(.(?![^&\s]{2,7};)|(&[^&\s;]{2,7};)){0,' . $cropPosition . '}$#ui' : '#^(.(?![^&\s]{2,7};)|(&[^&\s;]{2,7};)){0,' . $cropPosition . '}(?=\s)#ui'; + $cropRegEx = $chars < 0 ? + '#(?<=\s)' . $patternMatchEntityAsSingleChar . '{0,' . $cropPosition . '}$#ui' : + '#^' . $patternMatchEntityAsSingleChar . '{0,' . $cropPosition . '}(?=\s)#ui'; } else { - // The snippets "&[^&\s;]{2,7};" in the RegEx below represents entities. - $cropRegEx = $chars < 0 ? '#(.(?![^&\s]{2,7};)|(&[^&\s;]{2,7};)){0,' . $cropPosition . '}$#ui' : '#^(.(?![^&\s]{2,7};)|(&[^&\s;]{2,7};)){0,' . $cropPosition . '}#ui'; + $cropRegEx = $chars < 0 ? + '#' . $patternMatchEntityAsSingleChar . '{0,' . $cropPosition . '}$#ui' : + '#^' . $patternMatchEntityAsSingleChar . '{0,' . $cropPosition . '}#ui'; } if (preg_match($cropRegEx, $tempContent, $croppedMatch)) { $tempContent = $croppedMatch[0];