mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
shortening message: Solved issue with non latin characters
This commit is contained in:
parent
2747c19bdd
commit
ac78989fc9
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ function shortenmsg($msg, $limit, $twitter = false) {
|
||||||
$msg = "";
|
$msg = "";
|
||||||
$recycle = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8');
|
$recycle = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8');
|
||||||
foreach ($lines AS $row=>$line) {
|
foreach ($lines AS $row=>$line) {
|
||||||
if (strlen(trim($msg."\n".$line)) <= $limit)
|
if (iconv_strlen(trim($msg."\n".$line), "UTF-8") <= $limit)
|
||||||
$msg = trim($msg."\n".$line);
|
$msg = trim($msg."\n".$line);
|
||||||
// Is the new message empty by now or is it a reshared message?
|
// Is the new message empty by now or is it a reshared message?
|
||||||
elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))
|
elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))
|
||||||
|
|
Loading…
Reference in a new issue