diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 6c16a433ce1..c377c6d8de7 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -360,9 +360,11 @@ src.active2.fields["cdi_d"] = t1 if("notes") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return + t1 = copytext(t1, 1, MAX_PAPER_MESSAGE_LEN) + t1 = html_encode(t1) src.active2.fields["notes"] = t1 if("p_stat") if (istype(src.active1, /datum/data/record)) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index aee7d030098..6d06e4af8ba 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -464,9 +464,11 @@ What a mess.*/ active2.fields["ma_crim_d"] = t1 if("notes") if (istype(active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize notes:", "Secure. records", active2.fields["notes"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = input("Please summarize notes:", "Secure. records", active2.fields["notes"], null) as message if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return + t1 = copytext(t1, 1, MAX_PAPER_MESSAGE_LEN) + t1 = html_encode(t1) active2.fields["notes"] = t1 if("criminal") if (istype(active2, /datum/data/record)) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 06267f4cbbe..dc7fbfbc983 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -707,7 +707,7 @@ datum/preferences if(link_tags["OOC"]) var/tempnote = "" - tempnote = copytext(sanitize(input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text),1,1000) + tempnote = copytext(sanitize(input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text),1,MAX_MESSAGE_LEN) if(tempnote) metadata = tempnote return @@ -924,9 +924,10 @@ datum/preferences be_random_name = !be_random_name if(link_tags["flavor_text"]) - var/msg = copytext(sanitize(input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message),1,1000) + 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(flavor_text)) as message if(msg != null) + msg = copytext(msg, 1, MAX_MESSAGE_LEN) msg = html_encode(msg) flavor_text = msg @@ -1035,18 +1036,20 @@ datum/preferences user << browse(null, "window=records") if(link_tags["med_record"]) - var/medmsg = copytext(sanitize(input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message),1,2000) + var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message if(medmsg != null) + medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN) medmsg = html_encode(medmsg) med_record = medmsg SetRecords(user) if(link_tags["sec_record"]) - var/secmsg = copytext(sanitize(input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message),1,2000) + var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message if(secmsg != null) + secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN) secmsg = html_encode(secmsg) sec_record = secmsg