summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Murphy <sgmurphy@gmail.com>2009-02-05 17:29:58 -0500
committerSean Murphy <sgmurphy@gmail.com>2009-02-05 17:29:58 -0500
commite08b7f7205835fcad611e8b059a84c7a250999c7 (patch)
tree64734c75aa8fc809b3f36d0cb1d51fc485145e19
parentd4bdb2dc1924e2753baa4cf1751acb08b6ed3cae (diff)
Fix for unicode string auto-linking bug
-rw-r--r--lib/util.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index 87c239d5d..e96317520 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -447,7 +447,7 @@ function common_replace_urls_callback($text, $callback) {
// Replace it!
$start = mb_strpos($text, $url, $offset);
- $text = substr_replace($text, $modified_url, $start, mb_strlen($url));
+ $text = mb_substr($text, 0, $start).$modified_url.mb_substr($text, $start + mb_strlen($url), mb_strlen($text));
$offset = $start + mb_strlen($modified_url);
}