From cc9dfdc59c2aca2d83eee46084e91492825830de Mon Sep 17 00:00:00 2001 From: azulez Date: Mon, 25 Aug 2025 21:50:56 -0400 Subject: [PATCH] Allow stripped_multiline_input to correctly handle the null from cancelling, which is handled upstream. This prevents the field from being cleared on cancel due to html_encode changing the null to an empty string. (#30188) Also added newline per current .editorconfig --- code/__HELPERS/text.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 4f3eeced157..d937c83fffa 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -63,6 +63,8 @@ if(no_trim) return copytext(html_encode(name), 1, max_length) else + if(isnull(name)) + return null return trim(html_encode(name), max_length) //Runs byond's sanitization proc along-side strip_html_simple