return DRV_OK;
}
-static void encode_html_chars(struct strbuf *p)
-{
- int i;
- for (i = 0; i < p->len; i++) {
- if (p->buf[i] == '&')
- strbuf_splice(p, i, 1, "&", 5);
- if (p->buf[i] == '<')
- strbuf_splice(p, i, 1, "<", 4);
- if (p->buf[i] == '>')
- strbuf_splice(p, i, 1, ">", 4);
- if (p->buf[i] == '"')
- strbuf_splice(p, i, 1, """, 6);
- }
-}
-
static void wrap_in_html(struct strbuf *msg)
{
struct strbuf buf = STRBUF_INIT;
strbuf_addbuf(&buf, *p);
strbuf_addstr(&buf, pre_open);
added_header = 1;
- continue;
+ } else {
+ strbuf_addbuf(&buf, *p);
}
+ } else {
+ strbuf_addstr_xml_quoted(&buf, (*p)->buf);
}
- else
- encode_html_chars(*p);
- strbuf_addbuf(&buf, *p);
}
strbuf_addstr(&buf, pre_close);
strbuf_list_free(lines);