From c3a58f42e7f884b7a3604ec30a567d57f13f1141 Mon Sep 17 00:00:00 2001 From: Grant Woodford Date: Mon, 21 Oct 2013 22:15:46 +0200 Subject: [PATCH] Added a better way of detecting when a url does not have a protocol specified --- src/static/js/domline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/domline.js b/src/static/js/domline.js index 7b9e31ae..69508507 100644 --- a/src/static/js/domline.js +++ b/src/static/js/domline.js @@ -185,7 +185,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) { if (href) { - if(!~href.indexOf("http")) // if the url doesn't include http or https etc prefix it. + if(!~href.indexOf("://") && !~href.indexOf("mailto:")) // if the url doesn't include a protocol prefix, assume http { href = "http://"+href; }