[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: unquote?
- From: Patrick Donnelly <batrick@...>
- Date: Tue, 4 Oct 2011 17:47:19 -0400
On Tue, Oct 4, 2011 at 5:42 PM, Petite Abeille <email@example.com> wrote:
> On Oct 4, 2011, at 11:32 PM, Geoff Leyland wrote:
>>> Does anyone have a handy function to unquote a string.format %q transformation? I.e. reverse all the quoting performed by %q to revert to the original string, before quoting?
>> print(loadstring("return "..("%q"):format("here's a string"))()) ?
> Yes, that's a possibility. Unfortunately, as the string content is of unknown nature, simply executing it would be a bit reckless :)
How is it reckless when the manual explicitly says it's safe?
- Patrick Donnelly