Skip to content
Snippets Groups Projects
Commit 2bce59bd authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add support for conditional new-line Ctrl-A code (/) in html_encode()

parent 18aea294
No related branches found
No related tags found
No related merge requests found
......@@ -2201,13 +2201,19 @@ js_html_encode(JSContext *cx, uintN argc, jsval *arglist)
: tm.tm_hour>12 ? tm.tm_hour-12
: tm.tm_hour, tm.tm_min, tm.tm_hour>11 ? "pm":"am");
break;
case 'L':
currrow=0;
hpos=0;
outbuf[j++]='\r';
outbuf[j++]='\n';
break;
case '/': // conditional new-line
if(hpos > 0) {
hpos=0;
outbuf[j++]='\r';
outbuf[j++]='\n';
}
break;
case ']':
currrow++;
if(hpos!=0 && tmpbuf[i+2]!=CR && !(tmpbuf[i+2]==CTRL_A && tmpbuf[i+3]=='['))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment