jshint/jshint — Issue #464: support \0 in strings
Author: marianoguerra
Created: 2012-02-21 13:45:18+00:00
State: open

I get bad escapement warning if I use \0 in a string, here is a patch to allow using it:

diff --git a/jshint.js b/jshint.js
index 5f4d828..6b8c228 100644
--- a/jshint.js
+++ b/jshint.js
@@ -1240,6 +1240,9 @@ unclosedString: for (;;) {
case 't':
c = '\t';
break;
+ case '0':
+ c = '\0';
+ break;
case 'u':
esc(4);
break;

If I understand standardish language, it's defined in section 15.10.2.11 of the ECMA standard http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

search for or \0 in the document.