fixing a problem regarding broken links in plain/text

This commit is contained in:
Klaus Leithoff 2009-11-05 11:45:21 +00:00
parent b13d33580b
commit ec48789036

View File

@ -2572,7 +2572,8 @@
foreach ($s as $k=>$v) {
$cnt = strlen($v);
// only break long words within the wordboundaries,
if($cnt > $allowedLength) {
// but it may destroy links, so we check for href and dont it if we find one
if($cnt > $allowedLength && stripos($v,'href=')===false) {
$v=wordwrap($v, $allowedLength, $cut, true);
}
// the rest should be broken at the start of the new word that exceeds the limit