function escape_sqli(source)
to_replace = {"'", '"'}
replace_with = {"\'", '\"'}
output = source
for i = 1, table.getn(to_replace) do
output = string.gsub(output, to_replace[i], replace_with[i])
end
return output
end
我尝试使用上面的代码来转义 SQLis,但是当我尝试编译它时出现以下错误:
Unfinished String near '"}'