lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I guess I don't consider that a use case for s:format("%q") but rather a
> use case for io.write('[[' .. s .. ']]').

If s comes from user input, then this is unsafe if later loaded back into Lua:
s might be "]]; MALICIOUS CODE HERE ; [[" or something like that.