]> git.mxchange.org Git - friendica.git/commitdiff
The plaintext conversion had issues with counting the text size of posts with german...
authorMichael Vogel <icarus@dabo.de>
Mon, 1 Sep 2014 23:31:31 +0000 (01:31 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 1 Sep 2014 23:31:31 +0000 (01:31 +0200)
include/plaintext.php

index 56f0c7873d9943299affb7039b3b3ed9ecb0755d..cf0e209c067a5fb43bbb06d28f3a1d0dc94eab83 100644 (file)
@@ -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;