mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
fix(text_input): ports TG fix to length trim (#15833)
original commit: https://github.com/tgstation/tgstation/pull/81869/commits/df4397565fe6204985bb2b844ee37b5180cee508 local changes: adds new _defines file text.dm to start collecting text specific defines for better code readability
This commit is contained in:
@@ -32,9 +32,9 @@
|
||||
if(!user.client.prefs.tgui_input_mode)
|
||||
if(encode)
|
||||
if(multiline)
|
||||
return stripped_multiline_input(user, message, title, default, max_length)
|
||||
return stripped_multiline_input(user, message, title, default, PREVENT_CHARACTER_TRIM_LOSS(max_length))
|
||||
else
|
||||
return stripped_input(user, message, title, default, max_length)
|
||||
return stripped_input(user, message, title, default, PREVENT_CHARACTER_TRIM_LOSS(max_length))
|
||||
else
|
||||
if(multiline)
|
||||
return input(user, message, title, default) as message|null
|
||||
@@ -159,4 +159,4 @@
|
||||
/datum/tgui_input_text/proc/set_entry(entry)
|
||||
if(!isnull(entry))
|
||||
var/converted_entry = encode ? html_encode(entry) : entry
|
||||
src.entry = trim(converted_entry, max_length)
|
||||
src.entry = trim(converted_entry, PREVENT_CHARACTER_TRIM_LOSS(max_length))
|
||||
|
||||
Reference in New Issue
Block a user