From 80b3cae41e6b5d98cfdd85c9760e400ec6a908ae Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Sun, 14 Jul 2019 10:00:09 -0700 Subject: [PATCH] Update reject_bad_name --- code/__HELPERS/text.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 23dfd2caf6d..04d63e0e862 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -130,8 +130,10 @@ //Filters out undesirable characters from names /proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN) + // Decode so that names with characters like < are still rejected. Will be encoded again at the end + t_in = html_decode(t_in) if(!t_in || length(t_in) > max_length) - return //Rejects the input if it is null or if it is longer then the max length allowed + return //Rejects the input if it is null or if it is longer than the max length allowed var/number_of_alphanumeric = 0 var/last_char_group = 0 @@ -190,7 +192,7 @@ for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai","plating")) //prevents these common metagamey names if(cmptext(t_out,bad_name)) return //(not case sensitive) - return t_out + return html_encode(t_out) //checks text for html tags //if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm)