[s] Sanitizes text input/output in circuits (#32833)

* Adds Sanitization to TTS

* Sanitize input

* stripped_input

* strip debugger input

* Stripped inputs in pin inputs.

* stripped pin input

* stripped string pin input

* stripped char input pin.
This commit is contained in:
kevinz000
2017-11-16 22:36:18 -08:00
committed by CitadelStationBot
parent 2822e5820d
commit 8cf1266b72
7 changed files with 10 additions and 10 deletions
@@ -20,13 +20,13 @@
switch(type_to_use)
if("string")
accepting_refs = FALSE
new_data = input("Now type in a string.","[src] string writing") as null|text
new_data = stripped_input(user, "Now type in a string.","[src] string writing")
if(istext(new_data) && user.IsAdvancedToolUser())
data_to_write = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to \"[new_data]\".</span>")
if("number")
accepting_refs = FALSE
new_data = input("Now type in a number.","[src] number writing") as null|num
new_data = input(user, "Now type in a number.","[src] number writing") as null|num
if(isnum(new_data) && user.IsAdvancedToolUser())
data_to_write = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to [new_data].</span>")