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,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);