wordwrap , dont break overlong words containing html entities;

This commit is contained in:
Klaus Leithoff 2011-07-27 13:14:39 +00:00
parent 8756fcbf57
commit 6399e345cf

View File

@ -3133,7 +3133,8 @@
$cnt = strlen($v);
// only break long words within the wordboundaries,
// but it may destroy links, so we check for href and dont it if we find one
if($cnt > $allowedLength && stripos($v,'href=')===false && stripos($v,'onclick=')===false)
// we check for any html within the word, because we do not want to break html by accident
if($cnt > $allowedLength && stripos($v,'href=')===false && stripos($v,'onclick=')===false && $cnt == strlen(html_entity_decode($v)))
{
$v=wordwrap($v, $allowedLength, $cut, true);
}