[MIRROR] Runechat fixes spans in messages (#876)

* Runechat fixes spans in messages (#53809)

Prevents spans from showing up in runechat, this can happen from items like the recorder and how it stores messages.

Fixes #53799

* Runechat fixes spans in messages

Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
SkyratBot
2020-09-20 01:35:03 +02:00
committed by GitHub
parent f06f8b8081
commit fe5e4f1cd1
+4
View File
@@ -100,6 +100,10 @@
owned_by = owner.client
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, .proc/on_parent_qdel)
// Remove spans in the message from things like the recorder
var/static/regex/span_check = new(@"<\/?span[^>]*>", "gi")
text = replacetext(text, span_check, "")
// Clip message
var/maxlen = owned_by.prefs.max_chat_length
if (length_char(text) > maxlen)