From e051642ef96d6c980804bd5bf7f1cd011f149f3a Mon Sep 17 00:00:00 2001 From: Aussiemon Date: Tue, 21 Aug 2018 17:45:05 -0600 Subject: [PATCH] Changed initial sanitize step to remove carriage returns by key, not keycode --- vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua b/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua index 7908a55..3860c72 100644 --- a/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua +++ b/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua @@ -186,7 +186,7 @@ vmf:hook("ChatGui", "_update_input", function(func, self, input_service, menu_in local new_chat_message = self.chat_message -- remove carriage returns - local clipboard_data = tostring(Clipboard.get()):gsub(string.char(0x0D), "") + local clipboard_data = tostring(Clipboard.get()):gsub("\r", "") -- remove invalid characters if Utf8.valid(clipboard_data) then