diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:41:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:41:04 -0800 |
commit | be7baf913a1c8e57fd871ebed17b47bec7687a9d (patch) | |
tree | dcd69e02fe906893dc49ac4bcf183f3b5c1cfa29 /strbuf.h | |
parent | Merge branch 'nd/pathspec-wildcard' (diff) | |
parent | wrap_in_html(): process message in bulk rather than line-by-line (diff) | |
download | tgif-be7baf913a1c8e57fd871ebed17b47bec7687a9d.tar.xz |
Merge branch 'mh/unify-xml-in-imap-send-and-http-push'
Update imap-send to reuse xml quoting code from http-push codepath,
clean up some code, and fix a small bug.
* mh/unify-xml-in-imap-send-and-http-push:
wrap_in_html(): process message in bulk rather than line-by-line
wrap_in_html(): use strbuf_addstr_xml_quoted()
imap-send: change msg_data from storing (ptr, len) to storing strbuf
imap-send: correctly report errors reading from stdin
imap-send: store all_msgs as a strbuf
lf_to_crlf(): NUL-terminate msg_data::data
xml_entities(): use function strbuf_addstr_xml_quoted()
Add new function strbuf_add_xml_quoted()
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -136,6 +136,12 @@ extern void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap); extern void strbuf_add_lines(struct strbuf *sb, const char *prefix, const char *buf, size_t size); +/* + * Append s to sb, with the characters '<', '>', '&' and '"' converted + * into XML entities. + */ +extern void strbuf_addstr_xml_quoted(struct strbuf *sb, const char *s); + static inline void strbuf_complete_line(struct strbuf *sb) { if (sb->len && sb->buf[sb->len - 1] != '\n') |