summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-12 09:22:45 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-12 09:22:45 -0500
commitab8d27b8d1e25bd1058b904d03fedf97148f4b89 (patch)
tree56d7d7072a3e2242ddcf6ce7ec7414cc217afc63
parenteaae4562228bcbf780329d7bbb5f35437b31ebe3 (diff)
don't over specialize URLs
-rw-r--r--lib/util.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index a6f6a9351..37c941cdb 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;
}