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)
msg = spurdo(msg);
return msg.toString()
.replace("<", "&lt;")
.replace(">", "&gt;")
.split("<").join("&lt;")
.split(">").join("&gt;")
.replace(/\[b\](.*?)\[\/b\]/g, "<b>$1</b>") // bold
.replace(/\[i\](.*?)\[\/i\]/g, "<i>$1</i>") // italic
.replace(/\[color=(.*?)](.*?)\[\/color\]/g, "$2")