From 6399e345cfeca983eae0586a2d5d586e93fdf63d Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 27 Jul 2011 13:14:39 +0000 Subject: [PATCH] wordwrap , dont break overlong words containing html entities; --- felamimail/inc/class.bofelamimail.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/felamimail/inc/class.bofelamimail.inc.php b/felamimail/inc/class.bofelamimail.inc.php index d4787917c3..eb12a25652 100644 --- a/felamimail/inc/class.bofelamimail.inc.php +++ b/felamimail/inc/class.bofelamimail.inc.php @@ -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); }