mirror of https://github.com/calzoneman/sync.git
parent
a8076f0e15
commit
64bdbe7084
|
@ -448,7 +448,7 @@ Channel.prototype.sendMessage = function(username, msg, msgclass) {
|
||||||
// I don't want HTML from strangers
|
// I don't want HTML from strangers
|
||||||
msg = msg.replace(/</g, "<").replace(/>/g, ">");
|
msg = msg.replace(/</g, "<").replace(/>/g, ">");
|
||||||
// Match URLs
|
// Match URLs
|
||||||
msg = msg.replace(/(((https?)|(ftp))(:\/\/[0-9a-zA-Z\.]+(:[0-9]+)?[^\s$]+))/, "<a href=\"$1\">$1</a>");
|
msg = msg.replace(/(((https?)|(ftp))(:\/\/[0-9a-zA-Z\.]+(:[0-9]+)?[^\s$]+))/, "<a href=\"$1\" target=\"_blank\">$1</a>");
|
||||||
this.sendAll('chatMsg', {
|
this.sendAll('chatMsg', {
|
||||||
username: username,
|
username: username,
|
||||||
msg: msg,
|
msg: msg,
|
||||||
|
|
Loading…
Reference in New Issue