fuck replace

This commit is contained in:
Flummi 2017-12-04 17:40:16 +01:00
parent 407e613ce5
commit 61079e4000

View File

@ -125,8 +125,8 @@ export class tg extends EventEmitter {
if(this.server.spurdo) if(this.server.spurdo)
msg = spurdo(msg); msg = spurdo(msg);
return msg.toString() return msg.toString()
.replace("<", "&lt;") .split("<").join("&lt;")
.replace(">", "&gt;") .split(">").join("&gt;")
.replace(/\[b\](.*?)\[\/b\]/g, "<b>$1</b>") // bold .replace(/\[b\](.*?)\[\/b\]/g, "<b>$1</b>") // bold
.replace(/\[i\](.*?)\[\/i\]/g, "<i>$1</i>") // italic .replace(/\[i\](.*?)\[\/i\]/g, "<i>$1</i>") // italic
.replace(/\[color=(.*?)](.*?)\[\/color\]/g, "$2") .replace(/\[color=(.*?)](.*?)\[\/color\]/g, "$2")