Merge pull request #7432 from hlad/multibyte

Use multibyte string functions
This commit is contained in:
Hypolite Petovan 2019-07-26 10:26:39 -04:00 committed by GitHub
commit eefcf99af4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2444,8 +2444,8 @@ function api_convert_item($item)
$statustext = trim($statustitle."\n\n".$statusbody);
}
if ((defaults($item, 'network', Protocol::PHANTOM) == Protocol::FEED) && (strlen($statustext)> 1000)) {
$statustext = substr($statustext, 0, 1000) . "... \n" . defaults($item, 'plink', '');
if ((defaults($item, 'network', Protocol::PHANTOM) == Protocol::FEED) && (mb_strlen($statustext)> 1000)) {
$statustext = mb_substr($statustext, 0, 1000) . "... \n" . defaults($item, 'plink', '');
}
$statushtml = BBCode::convert(api_clean_attachments($body), false);