Fix for ticket #2248: flickr etc URLs that contain @ in the paths etc no longer accidentally trip the mailto: thingy

This commit is contained in:
Brion Vibber 2011-02-25 15:46:35 -08:00
parent e00483d703
commit 6a6584741f

View File

@ -922,7 +922,7 @@ function common_linkify($url) {
// functions
$url = htmlspecialchars_decode($url);
if(strpos($url, '@') !== false && strpos($url, ':') === false) {
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";