1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

better text cleanup

This commit is contained in:
Robin Appelman 2015-01-27 20:10:24 +01:00
commit f93ae7a6ac

View file

@ -405,7 +405,8 @@ Packet.userMessageParsers = {
stream.readASCIIString(); stream.readASCIIString();
} }
// cleanup color codes // cleanup color codes
text = text.replace('\u0001', ''); text = text.replace(/\u0001/g, '');
text = text.replace(/\u0003/g, '');
while ((pos = text.indexOf('\u0007')) !== -1) { while ((pos = text.indexOf('\u0007')) !== -1) {
text = text.slice(0, pos) + text.slice(pos + 7); text = text.slice(0, pos) + text.slice(pos + 7);
} }