diff options
author | Grant Woodford <grant@eyesonlynetwork.com> | 2013-10-21 22:15:46 +0200 |
---|---|---|
committer | Grant Woodford <grant@eyesonlynetwork.com> | 2013-10-21 22:15:46 +0200 |
commit | c3a58f42e7f884b7a3604ec30a567d57f13f1141 (patch) | |
tree | a1bb9ecd14bb60f89c0ea4dd71f6e9b344e45df1 /src | |
parent | a120d78b7ef5287c802ec2e950b68669257aab51 (diff) | |
download | etherpad-lite-c3a58f42e7f884b7a3604ec30a567d57f13f1141.zip |
Added a better way of detecting when a url does not have a protocol specified
Diffstat (limited to 'src')
-rw-r--r-- | src/static/js/domline.js | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |