util/format.lua
changeset 12224 25b853e64d83
parent 12044 337b489532b7
child 12225 056b7920b686
--- a/util/format.lua	Thu Jan 27 16:23:26 2022 +0100
+++ b/util/format.lua	Thu Jan 27 21:14:22 2022 +0100
@@ -108,7 +108,7 @@
 		if t == "string" and option ~= "p" then
 			if not valid_utf8(arg) then
 				option = "q";
-			else
+			elseif option ~= "q" then -- gets fully escaped in the next block
 				args[i] = arg:gsub("[%z\1-\8\11-\31\127]", control_symbols):gsub("\n\t?", "\n\t");
 				return spec;
 			end