changed evalURL(): now checks if url is actually a mail-address and prefixes it with "mailto:" if necessary

This commit is contained in:
Robert Gaggl 2002-07-26 22:59:13 +00:00
parent 8990d95080
commit e95ca73047

View file

@ -118,7 +118,9 @@ function activateLinks (str) {
*/
function evalURL(url) {
if (url && url.indexOf("://") < 0)
if (url && url.indexOf("@") > 0 && url.indexOf("mailto:") == -1)
return ("mailto:" + url);
else if (url && url.indexOf("://") == -1)
return ("http://" + url);
return (url);
}