return -1;
/* mandatory escape or control char */
- if(codepoint == '\\' || codepoint == '"' || codepoint < 0x20)
+ if(codepoint == '\\' || codepoint == '/' || codepoint == '"' || codepoint < 0x20)
break;
/* non-ASCII */
if(end == pos)
break;
- /* handle \, ", and control codes */
+ /* handle \, /, ", and control codes */
length = 2;
switch(codepoint)
{
case '\\': text = "\\\\"; break;
+ case '/': text = "\\/"; break;
case '\"': text = "\\\""; break;
case '\b': text = "\\b"; break;
case '\f': text = "\\f"; break;