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.

pull/128/head^2
John McLear 2011-11-20 04:24:58 +00:00
parent 697201b3de
commit 55a2f46ca9
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}