From: Evan Prodromou Date: Thu, 12 Feb 2009 14:22:45 +0000 (-0500) Subject: don't over specialize URLs X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ab8d27b8d1e25bd1058b904d03fedf97148f4b89;p=quix0rs-gnu-social.git don't over specialize URLs --- diff --git a/lib/util.php b/lib/util.php index a6f6a93518..37c941cdb4 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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; }