In Lua they don't (appear?) to be syntactically relevant, but in JS they very much are, especially with the way that the Lua syntax is compiled into JS. For example: ```lua return "This is a `string with backticks` in it" ``` Is compiled to JS as: ``` return [`This is a `string with backticks` in it`] ``` Where "string with backticks" is evaluated as literal JS code. This is _potentially_ a security issue because a specially-formatted string could evaluate arbitrary JS code. More annoyingly, though, it means that any string with backticks in it is probably going to cause the JS interpeter to crash. This commit fixes that by escaping backtick characters with a \, so the compiled JS above would instead look like: ``` return [`This is a \`string with backticks\` in it`] ``` Much better!pull/12/head
parent
2f1cf03d42
commit
4875b47021
Loading…
Reference in new issue