From 8594b479e25cf3719754421fa407e5fda2b920bd Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 23 Oct 2020 23:56:23 +0800 Subject: [PATCH] Fix bad escaping of < and >, fix kaetemi/ryzomclassic#150 --- ryzom/common/data_common/r2/r2_misc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ryzom/common/data_common/r2/r2_misc.lua b/ryzom/common/data_common/r2/r2_misc.lua index 2402ff1fd..293e9b33c 100644 --- a/ryzom/common/data_common/r2/r2_misc.lua +++ b/ryzom/common/data_common/r2/r2_misc.lua @@ -191,9 +191,9 @@ end ------------------------------------------------------------------------------------------------- -- enclose a string by double quotes function strifyXml(str) - local strxml = string.gsub(tostring(str), ">", ">") + local strxml = string.gsub(tostring(str), "&", "&") strxml = string.gsub(strxml, "<", "<") - strxml = string.gsub(strxml, "&", "&") + strxml = string.gsub(strxml, ">", ">") strxml = string.gsub(strxml, "'", "'") strxml = string.gsub(strxml, '"', """) return [["]] .. strxml .. [["]]