X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=37c941cdb45df436d4f204582dc38c1681b407b9;hb=ab8d27b8d1e25bd1058b904d03fedf97148f4b89;hp=a6f6a935186ef4ca754837a43f9be86850cc5cc4;hpb=eaae4562228bcbf780329d7bbb5f35437b31ebe3;p=quix0rs-gnu-social.git 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; }