forked from extern/egroupware
* infolog: when breaking overlong words into fitting pieces, do not break lines that are tested positive to contain links. (reported as Helpdesk issue #1324 in Stylite tracker)
This commit is contained in:
parent
67575e1cd1
commit
1f66093694
@ -1352,9 +1352,13 @@ class infolog_ui
|
||||
// set blank behind all , and . if words are too long, apply wordwrap afterwards to make sure we get
|
||||
if (strlen($word)>75)
|
||||
{
|
||||
if (!(strpos($word,',')===false) && strpos($word,', ')===false) $word = str_replace(',',', ',$word);
|
||||
if (!(strpos($word,'.')===false) && strpos($word,'. ')===false) $word = str_replace('.','. ',$word);
|
||||
$word = wordwrap($word, 75, ' ', true);
|
||||
$buff = html::activate_links($word);
|
||||
if (strlen($buff) == strlen($word)) // no links -> try to break overlong words
|
||||
{
|
||||
if (!(strpos($word,',')===false) && strpos($word,', ')===false) $word = str_replace(',',', ',$word);
|
||||
if (!(strpos($word,'.')===false) && strpos($word,'. ')===false) $word = str_replace('.','. ',$word);
|
||||
$word = wordwrap($word, 75, ' ', true);
|
||||
}
|
||||
}
|
||||
$ckarray[] =$word;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user