summaryrefslogtreecommitdiff
path: root/static/js/domline.js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2011-11-20 04:24:58 +0000
committerJohn McLear <john@mclear.co.uk>2011-11-20 04:24:58 +0000
commit55a2f46ca90391e9446eff874b83e45a0161d252 (patch)
tree86523583038ad6d28976bc85af3c6b8a36722c48 /static/js/domline.js
parent697201b3def7cb7173dfebac50624dc694e34fd6 (diff)
downloadetherpad-lite-55a2f46ca90391e9446eff874b83e45a0161d252.zip
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.
Diffstat (limited to 'static/js/domline.js')
-rw-r--r--static/js/domline.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/static/js/domline.js b/static/js/domline.js
index 119b8378..7732805f 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 + '<a href="' + href.replace(/\"/g, '&quot;') + '">';
extraCloseTags = '</a>' + extraCloseTags;
}