View Single Post
06/26/14, 06:41 AM   #22
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Hey,
I think this is a normal behavior. It's up to you to make sure that '\' is allways properly escaped.

Originally Posted by Lua Reference Manual
Literal strings can be delimited by matching single or double quotes, and can contain the following C-like escape sequences: '\a' (bell), '\b' (backspace), '\f' (form feed), '\n' (newline), '\r' (carriage return), '\t' (horizontal tab), '\v' (vertical tab), '\\' (backslash), '\"' (quotation mark [double quote]), and '\'' (apostrophe [single quote])
You can also write:
local text = "Blah\\blah"
d(text)

you will get:
Blah\blah

Edit:
On the other hand they are escaping " characters, so you may be right that they should also escape \.

Last edited by Harven : 06/26/14 at 06:58 AM.
  Reply With Quote