]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
trac31 don't shorten URLs prefixed with a *
authormillette <millette@controlyourself.ca>
Fri, 7 Nov 2008 20:30:39 +0000 (15:30 -0500)
committermillette <millette@controlyourself.ca>
Fri, 7 Nov 2008 20:30:39 +0000 (15:30 -0500)
darcs-hash:20081107203039-099f7-a059dab8d6b7909c309eacf5ef929408c3c6c6e0.gz

lib/util.php

index 4f93d572e48c47820eef1f35e45d2a3c51443d32..364e9e79cd97f370ddb2e98a5b07243e2817046f 100644 (file)
@@ -749,7 +749,8 @@ function common_render_uri_thingy($matches) {
 
 function common_shorten_links($text) {
        $r = htmlspecialchars($text);
-       $r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
+    // \s = not a horizontal whitespace character (since PHP 5.2.4)
+       $r = preg_replace('@[^*]https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
        return $r;
 }