diff --git a/lib/nsui.js b/lib/nsui.js index bdc35ae..4582351 100644 --- a/lib/nsui.js +++ b/lib/nsui.js @@ -158,7 +158,7 @@ Nsui.prototype.formatInteger = function(num, len) { }; Nsui.prototype.formatMessage = function(msg) { - var dt = new Date(), fmt = ""; + var dt = new Date(), fmt = "", lnk_exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; fmt += '
'; + fmt += this.sanitizeText(msg.message).replace(lnk_exp, '$1'); + fmt += ''; return fmt; };