mirror of
https://github.com/friendica/friendica
synced 2025-05-09 00:24:10 +02:00
Fix Plaintext class
This commit is contained in:
parent
2ff280d34c
commit
c311a65073
2 changed files with 16 additions and 14 deletions
|
@ -244,13 +244,12 @@ class Plaintext
|
|||
$part = '';
|
||||
$break_pos = 0;
|
||||
$comma_pos = 0;
|
||||
$pos = 0;
|
||||
$word = '';
|
||||
|
||||
$limit = $baselimit;
|
||||
|
||||
while ($message) {
|
||||
$word = $message;
|
||||
$message = '';
|
||||
$pos = 0;
|
||||
$pos_word = mb_strpos($message, ' ');
|
||||
$pos_paragraph = mb_strpos($message, "\n");
|
||||
|
||||
|
@ -260,6 +259,9 @@ class Plaintext
|
|||
$pos = $pos_word + 1;
|
||||
} elseif ($pos_paragraph !== false) {
|
||||
$pos = $pos_paragraph + 1;
|
||||
} else {
|
||||
$word = $message;
|
||||
$message = '';
|
||||
}
|
||||
|
||||
if (trim($message)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue