]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't over specialize URLs
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 12 Feb 2009 14:22:45 +0000 (09:22 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 12 Feb 2009 14:22:45 +0000 (09:22 -0500)
lib/util.php

index a6f6a935186ef4ca754837a43f9be86850cc5cc4..37c941cdb45df436d4f204582dc38c1681b407b9 100644 (file)
@@ -472,13 +472,15 @@ function common_replace_urls_callback($text, $callback) {
 }
 
 function common_linkify($url) {
+    // It comes in special'd, so we unspecial it before passing to the stringifying
+    // functions
+    $url = htmlspecialchars_decode($url);
     $display = $url;
-    $url = (!preg_match('#^([a-z]+://|(mailto|aim|tel):)#i', $url)) ? 'http://'.$url:$url;
+    $url = (!preg_match('#^([a-z]+://|(mailto|aim|tel):)#i', $url)) ? 'http://'.$url : $url;
 
     $attrs = array('href' => $url, 'rel' => 'external');
 
     if ($longurl = common_longurl($url)) {
-        $longurl = htmlentities($longurl, ENT_QUOTES, 'UTF-8');
         $attrs['title'] = $longurl;
     }