From 4d6f2118c845669fbf29cc8514294cd3acf8a64c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 15 Dec 2020 13:32:27 -0700 Subject: [PATCH 1/2] Update saved_circuits.dm --- .../modules/integrated_electronics/core/saved_circuits.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/modules/integrated_electronics/core/saved_circuits.dm b/code/modules/integrated_electronics/core/saved_circuits.dm index 61ada24b25..64451c442c 100644 --- a/code/modules/integrated_electronics/core/saved_circuits.dm +++ b/code/modules/integrated_electronics/core/saved_circuits.dm @@ -91,7 +91,7 @@ /obj/item/integrated_circuit/proc/load(list/component_params) // Load name if(component_params["name"]) - displayed_name = component_params["name"] + displayed_name = html_encode(component_params["name"]) // Load input values if(component_params["inputs"]) @@ -152,19 +152,17 @@ /obj/item/electronic_assembly/proc/load(list/assembly_params) // Load modified name, if any. if(assembly_params["name"]) - name = assembly_params["name"] + name = html_encode(assembly_params["name"]) // Load modified description, if any. if(assembly_params["desc"]) - desc = assembly_params["desc"] + desc = html_encode(assembly_params["desc"]) if(assembly_params["detail_color"]) detail_color = assembly_params["detail_color"] update_icon() - - // Attempts to save an assembly into a save file format. // Returns null if assembly is not complete enough to be saved. /datum/controller/subsystem/processing/circuit/proc/save_electronic_assembly(obj/item/electronic_assembly/assembly) From 4a30064a2ca3f2b8d67a8d924f42e8252e307781 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 15 Dec 2020 14:09:44 -0700 Subject: [PATCH 2/2] Update saved_circuits.dm --- code/modules/integrated_electronics/core/saved_circuits.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/integrated_electronics/core/saved_circuits.dm b/code/modules/integrated_electronics/core/saved_circuits.dm index 64451c442c..5a4e185839 100644 --- a/code/modules/integrated_electronics/core/saved_circuits.dm +++ b/code/modules/integrated_electronics/core/saved_circuits.dm @@ -104,7 +104,7 @@ var/datum/integrated_io/pin = inputs[index] // The pins themselves validate the data. - pin.write_data_to_pin(input_value) + pin.write_data_to_pin(istext(input_value)? html_encode(input_value) : input_value) // TODO: support for special input types, such as internal refs and maybe typepaths if(!isnull(component_params["special"]))