mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Encode changes (#11301)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5e6a4639d0
commit
4e2361f8df
@@ -323,7 +323,7 @@
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("rename")
|
||||
var/new_name = sanitizeSafe(tgui_input_text(ui.user,"Please enter your name.","Communicator",ui.user.name) )
|
||||
var/new_name = sanitizeSafe(tgui_input_text(ui.user,"Please enter your name.","Communicator",ui.user.name, encode = FALSE))
|
||||
if(new_name)
|
||||
register_device(new_name)
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node."))
|
||||
return FALSE
|
||||
var/their_address = params["message"]
|
||||
var/text = sanitizeSafe(tgui_input_text(ui.user,"Enter your message.","Text Message"))
|
||||
var/text = sanitizeSafe(tgui_input_text(ui.user,"Enter your message.","Text Message", encode = FALSE))
|
||||
if(text)
|
||||
exonet.send_message(their_address, "text", text)
|
||||
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = sanitize(tgui_input_text(user, "Reason:","Why do you require this item?",""))
|
||||
var/reason = tgui_input_text(user, "Reason:","Why do you require this item?","", MAX_MESSAGE_LEN)
|
||||
if(world.time > timeout)
|
||||
to_chat(user, span_warning("Error. Request timed out."))
|
||||
return
|
||||
@@ -155,7 +155,7 @@
|
||||
return
|
||||
|
||||
if(href_list["edit"])
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
var/new_val = tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"], MAX_MESSAGE_LEN)
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(href_list["edit"])
|
||||
var/field = tgui_alert(user, "Select which field to edit", "Field?", list("Name", "Quantity", "Value"))
|
||||
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
var/new_val = tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"])
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
// Else clause means they're editing/deleting the whole export report, rather than a specific item in it
|
||||
else if(href_list["edit"])
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
var/new_val = tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"])
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
post_status("alert", href_list["alert"])
|
||||
internal_data["stat_display_special"] = href_list["alert"]
|
||||
if("setmsg")
|
||||
internal_data["stat_display_line[href_list["line"]]"] = reject_bad_text(sanitize(tgui_input_text(usr, "Line 1", "Enter Message Text", internal_data["stat_display_line[href_list["line"]]"], 40), 40), 40)
|
||||
internal_data["stat_display_line[href_list["line"]]"] = reject_bad_text(tgui_input_text(usr, "Line 1", "Enter Message Text", internal_data["stat_display_line[href_list["line"]]"], 40), 40)
|
||||
else
|
||||
post_status(href_list["stat_display"])
|
||||
internal_data["stat_display_special"] = href_list["stat_display"]
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
if(choice)
|
||||
var/obj/item/communicator/chosen_communicator = choice
|
||||
var/mob/observer/dead/O = src
|
||||
var/text_message = sanitize(tgui_input_text(src, "What do you want the message to say?", multiline = TRUE))
|
||||
var/text_message = sanitize(tgui_input_text(src, "What do you want the message to say?", encode = FALSE, multiline = TRUE), MAX_MESSAGE_LEN, FALSE, FALSE, TRUE)
|
||||
if(text_message && O.exonet)
|
||||
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user