1
1
Fork 0

The plaintext conversion had issues with counting the text size of posts with german umlauts

This commit is contained in:
Michael Vogel 2014-09-02 01:31:31 +02:00
parent 150310ea3a
commit b66a031b34

View file

@ -172,10 +172,10 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) {
$msg = str_replace(" ", " ", $msg); $msg = str_replace(" ", " ", $msg);
// Twitter is using its own limiter, so we always assume that shortened links will have this length // Twitter is using its own limiter, so we always assume that shortened links will have this length
if (strlen($link) > 0) if (iconv_strlen($link, "UTF-8") > 0)
$limit = $limit - 23; $limit = $limit - 23;
if (strlen($msg) > $limit) { if (iconv_strlen($msg, "UTF-8") > $limit) {
if (!isset($post["url"])) { if (!isset($post["url"])) {
$limit = $limit - 23; $limit = $limit - 23;