issue #49 fixed

This commit is contained in:
Joachim Stolberg 2020-07-23 19:55:04 +02:00
parent 3f67446cc2
commit a5c1fd6182

@ -37,7 +37,8 @@ end
-- '#' is used as placeholder for rule numbers and has to be escaped -- '#' is used as placeholder for rule numbers and has to be escaped
function smartline.escape(s) function smartline.escape(s)
s = tostring(s) s = tostring(s)
s = s:gsub('"', '\\"') -- to prevent code injection!!! s = s:gsub('\\', '') -- to prevent code injection!!!
s = s:gsub('"', '\\"') -- to prevent code injection!!!
return s:gsub("#", '"..string.char(35).."') return s:gsub("#", '"..string.char(35).."')
end end