From: Brion Vibber Date: Fri, 25 Feb 2011 23:46:35 +0000 (-0800) Subject: Fix for ticket #2248: flickr etc URLs that contain @ in the paths etc no longer accid... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6a6584741f3d91bff2461421ef220b2bcae7847d;p=quix0rs-gnu-social.git Fix for ticket #2248: flickr etc URLs that contain @ in the paths etc no longer accidentally trip the mailto: thingy --- diff --git a/lib/util.php b/lib/util.php index 85f49e4c59..8dd22de592 100644 --- a/lib/util.php +++ b/lib/util.php @@ -922,11 +922,11 @@ function common_linkify($url) { // functions $url = htmlspecialchars_decode($url); - if(strpos($url, '@') !== false && strpos($url, ':') === false) { - //url is an email address without the mailto: protocol - $canon = "mailto:$url"; - $longurl = "mailto:$url"; - }else{ + if (strpos($url, '@') !== false && strpos($url, ':') === false && Validate::email($url)) { + //url is an email address without the mailto: protocol + $canon = "mailto:$url"; + $longurl = "mailto:$url"; + } else { $canon = File_redirection::_canonUrl($url);