Adds sanitation to flavor_text (#2926)

Exactly what it sounds like. Boy, my security skills are shit, for
someone who's supposed to be studying exactly this shit at uni, isn't
it?
This commit is contained in:
ktccd
2017-09-24 10:15:02 +02:00
committed by Poojawa
parent 6966ebc14f
commit c8aeec815a
+2 -2
View File
@@ -170,7 +170,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/parallax
var/uplink_spawn_loc = UPLINK_PDA
var/list/exp
var/list/menuoptions
@@ -922,7 +922,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("flavor_text")
var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(features["flavor_text"])) as message
if(msg != null)
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
msg = html_encode(msg)
features["flavor_text"] = msg