From b66a031b3487251c444598003d159f01e62d1c9d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 2 Sep 2014 01:31:31 +0200 Subject: [PATCH] The plaintext conversion had issues with counting the text size of posts with german umlauts --- include/plaintext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plaintext.php b/include/plaintext.php index 56f0c7873d..cf0e209c06 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -172,10 +172,10 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) { $msg = str_replace(" ", " ", $msg); // 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; - if (strlen($msg) > $limit) { + if (iconv_strlen($msg, "UTF-8") > $limit) { if (!isset($post["url"])) { $limit = $limit - 23;