Changed initial sanitize step to remove carriage returns by key, not keycode

This commit is contained in:
Aussiemon 2018-08-21 17:45:05 -06:00
parent 6a389d3a6f
commit e051642ef9

View file

@ -186,7 +186,7 @@ vmf:hook("ChatGui", "_update_input", function(func, self, input_service, menu_in
local new_chat_message = self.chat_message local new_chat_message = self.chat_message
-- remove carriage returns -- remove carriage returns
local clipboard_data = tostring(Clipboard.get()):gsub(string.char(0x0D), "") local clipboard_data = tostring(Clipboard.get()):gsub("\r", "")
-- remove invalid characters -- remove invalid characters
if Utf8.valid(clipboard_data) then if Utf8.valid(clipboard_data) then