From 55a2f46ca90391e9446eff874b83e45a0161d252 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 20 Nov 2011 04:24:58 +0000 Subject: [PATCH] https://github.com/Pita/etherpad-lite/issues/143 - needs to be included with earlier commit that should still be in master if pita didn't remove. This fixes the bug where a url without http:// wouldnt be detected as a url and then a subsequent bug I am the father of where it would detect it as a user, open a new page but fudge up the url and make the page fail to load. --- static/js/domline.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/domline.js b/static/js/domline.js index 119b83783..7732805fd 100644 --- a/static/js/domline.js +++ b/static/js/domline.js @@ -152,6 +152,10 @@ 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. + { + href = "http://"+href; + } extraOpenTags = extraOpenTags + ''; extraCloseTags = '' + extraCloseTags; }