diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-03 04:35:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-03 04:35:29 +0200 |
commit | 130f74381c9b07ae51dc8e0657909b11fadf6ec0 (patch) | |
tree | 13e70a3bcceb0784252699b10f5e83b5f861e47f /util | |
parent | 7e09f662cbe7f76753a936bb1aff1952489a9d3c (diff) | |
download | prosody-130f74381c9b07ae51dc8e0657909b11fadf6ec0.tar.gz prosody-130f74381c9b07ae51dc8e0657909b11fadf6ec0.zip |
util.format: Escape ASCII control characters also in extra arguments
Diffstat (limited to 'util')
-rw-r--r-- | util/format.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/format.lua b/util/format.lua index 2a29c4f3..43097e6a 100644 --- a/util/format.lua +++ b/util/format.lua @@ -79,7 +79,7 @@ local function format(formatstring, ...) if arg == nil then args[i] = "(nil)"; else - args[i] = tostring(arg); + args[i] = tostring(arg):gsub("[%z\1-\8\11-\31\127]", control_symbols):gsub("\n\t?", "\n\t"); end formatstring = formatstring .. " [%s]" end |