src/highlighter.c

changeset 80
0f1c55d2a90a
parent 76
44c7423d6ce2
equal deleted inserted replaced
79:07a3743ce6ac 80:0f1c55d2a90a
38 static void put_htmlescaped(CxBuffer *dest, char c) { 38 static void put_htmlescaped(CxBuffer *dest, char c) {
39 if (c == '>') { 39 if (c == '>') {
40 cxBufferPutString(dest, ">"); 40 cxBufferPutString(dest, ">");
41 } else if (c == '<') { 41 } else if (c == '<') {
42 cxBufferPutString(dest, "&lt;"); 42 cxBufferPutString(dest, "&lt;");
43 } else if (c == '&') {
44 cxBufferPutString(dest, "&amp;");
43 } else if (c) { 45 } else if (c) {
44 cxBufferPut(dest, c); 46 cxBufferPut(dest, c);
45 } 47 }
46 } 48 }
47 49

mercurial