Merge pull request #410 from thelounge/xpaw/url-protocol
Prepend http protocol to www. links in chat
This commit is contained in:
commit
1c6c19fea5
@ -14,7 +14,7 @@ function uri(text) {
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
var split = url.split("<");
|
var split = url.split("<");
|
||||||
url = "<a href='" + split[0].replace(/^www/, "//www") + "' target='_blank' rel='noopener'>" + split[0] + "</a>";
|
url = "<a href='" + split[0].replace(/^www/, "http://www") + "' target='_blank' rel='noopener'>" + split[0] + "</a>";
|
||||||
if (split.length > 1) {
|
if (split.length > 1) {
|
||||||
url += "<" + split.slice(1).join("<");
|
url += "<" + split.slice(1).join("<");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user