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.
This commit is contained in:
parent
697201b3de
commit
55a2f46ca9
1 changed files with 4 additions and 0 deletions
|
@ -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, '"') + '">';
|
||||
extraCloseTags = '</a>' + extraCloseTags;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue