mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
stripped_input now actually uses the max length at all times (#12983)
This commit is contained in:
@@ -108,11 +108,10 @@
|
||||
|
||||
// Used to get a sanitized input.
|
||||
/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
|
||||
var/name = input(user, message, title, default) as text|null
|
||||
if(no_trim)
|
||||
return copytext(html_encode(name), 1, max_length)
|
||||
else
|
||||
return trim(html_encode(name), max_length) //trim is "outside" because html_encode can expand single symbols into multiple symbols (such as turning < into <)
|
||||
var/name = html_encode(input(user, message, title, default) as text|null)
|
||||
if(!no_trim)
|
||||
name = trim(name) //trim is "outside" because html_encode can expand single symbols into multiple symbols (such as turning < into <)
|
||||
return copytext(name, 1, max_length)
|
||||
|
||||
// Uses client.typing to check if the popup should appear or not
|
||||
/proc/typing_input(mob/user, message = "", title = "", default = "")
|
||||
|
||||
Reference in New Issue
Block a user