mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user