mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 03:11:40 +01:00
fix problem with unmotivated linebreaks in text on wordwrap. issue reported on userlist for broken umlauts
This commit is contained in:
parent
f1d6806fb1
commit
30a3fd1b6b
@ -3220,15 +3220,17 @@
|
||||
substr($line,0,strlen($dontbreaklinesstartingwith)) != $dontbreaklinesstartingwith
|
||||
)
|
||||
)
|
||||
) {
|
||||
)
|
||||
{
|
||||
$s=explode(" ", $line);
|
||||
$line = "";
|
||||
$linecnt = 0;
|
||||
foreach ($s as $k=>$v) {
|
||||
$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)
|
||||
// but it may destroy links, so we check for href and dont do it if we find one
|
||||
// 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user