]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
text substitution is Unicode-aware for twitterstatusfetcher
authorEvan Prodromou <evan@status.net>
Tue, 7 Sep 2010 19:54:06 +0000 (15:54 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 7 Sep 2010 19:54:06 +0000 (15:54 -0400)
plugins/TwitterBridge/daemons/twitterstatusfetcher.php

index 96a517732a931f1eb50118d353a1349b16689e16..f1305696b3f59bf83a88cdce5d14c6722f53d9b3 100755 (executable)
@@ -759,10 +759,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
             default:
                 continue;
             }
-            $text = substr_replace($text,
-                                   $linkText,
-                                   $object->indices[0],
-                                   $object->indices[1] - $object->indices[0]);
+            $text = mb_substr($text, 0, $object->indices[0]) . $linkText . mb_substr($text, $object->indices[1]);
         }
         return $text;
     }