]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixes #1258: A period in a hashtag leads to the tag being interpreted as url and...
authorAdrian Lang <mail@adrianlang.de>
Sun, 22 Feb 2009 16:45:26 +0000 (17:45 +0100)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 27 Feb 2009 23:44:06 +0000 (15:44 -0800)
lib/util.php

index 5345a08bba08346e028a55f164fcf609b416e5fd..18e4f310ce0ef4b951809628dad0cb992fb0a0ee 100644 (file)
@@ -456,6 +456,9 @@ function common_replace_urls_callback($text, $callback) {
 
         if (!in_array($url_parts[2], $tlds)) continue;
 
+        // Make sure we didn't capture a hash tag
+        if (strpos($url, '#') === 0) continue;
+
         // Put the url back the way we found it.
         $url = (mb_strpos($orig_url, htmlspecialchars($url)) === FALSE) ? $url:htmlspecialchars($url);