mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-11 15:15:32 +01:00
sanitize() refactor: third pass (misc)
This commit is contained in:
@@ -145,7 +145,7 @@
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
|
||||
if( (world.address == address || !address) && !host )
|
||||
|
||||
@@ -995,16 +995,10 @@ datum/preferences
|
||||
ShowChoices(user)
|
||||
return
|
||||
if("general")
|
||||
var/msg = input(usr,"Give a general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Give a general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["task"]] = msg
|
||||
else
|
||||
var/msg = input(usr,"Set the flavor text for your [href_list["task"]].","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the flavor text for your [href_list["task"]].","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["task"]] = msg
|
||||
SetFlavorText(user)
|
||||
return
|
||||
@@ -1019,16 +1013,10 @@ datum/preferences
|
||||
ShowChoices(user)
|
||||
return
|
||||
if("Default")
|
||||
var/msg = input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(flavour_texts_robot["Default"])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(flavour_texts_robot["Default"])) as message, extra = 0)
|
||||
flavour_texts_robot[href_list["task"]] = msg
|
||||
else
|
||||
var/msg = input(usr,"Set the flavour text for your robot with [href_list["task"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(flavour_texts_robot[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the flavour text for your robot with [href_list["task"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(flavour_texts_robot[href_list["task"]])) as message, extra = 0)
|
||||
flavour_texts_robot[href_list["task"]] = msg
|
||||
SetFlavourTextRobot(user)
|
||||
return
|
||||
@@ -1044,41 +1032,25 @@ datum/preferences
|
||||
else
|
||||
user << browse(null, "window=records")
|
||||
if(href_list["task"] == "med_record")
|
||||
var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message
|
||||
|
||||
var/medmsg = sanitize(input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(medmsg != null)
|
||||
medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
medmsg = html_encode(medmsg)
|
||||
|
||||
med_record = medmsg
|
||||
SetRecords(user)
|
||||
|
||||
if(href_list["task"] == "sec_record")
|
||||
var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message
|
||||
|
||||
var/secmsg = sanitize(input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(secmsg != null)
|
||||
secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
secmsg = html_encode(secmsg)
|
||||
|
||||
sec_record = secmsg
|
||||
SetRecords(user)
|
||||
if(href_list["task"] == "gen_record")
|
||||
var/genmsg = input(usr,"Set your employment notes here.","Employment Records",html_decode(gen_record)) as message
|
||||
|
||||
var/genmsg = sanitize(input(usr,"Set your employment notes here.","Employment Records",html_decode(gen_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(genmsg != null)
|
||||
genmsg = copytext(genmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
genmsg = html_encode(genmsg)
|
||||
|
||||
gen_record = genmsg
|
||||
SetRecords(user)
|
||||
|
||||
if(href_list["task"] == "exploitable_record")
|
||||
var/exploitmsg = input(usr,"Set exploitable information about you here.","Exploitable Information",html_decode(exploit_record)) as message
|
||||
|
||||
var/exploitmsg = sanitize(input(usr,"Set exploitable information about you here.","Exploitable Information",html_decode(exploit_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(exploitmsg != null)
|
||||
exploitmsg = copytext(exploitmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
exploitmsg = html_encode(exploitmsg)
|
||||
|
||||
exploit_record = exploitmsg
|
||||
SetAntagoptions(user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user