xml_entities(): use function strbuf_addstr_xml_quoted()
[gitweb.git] / strbuf.h
index be941ee481a735dcc73e3821c93e8ee682478d18..65aa2a032f6e8ef89dad51173085c7380c15bef0 100644 (file)
--- a/strbuf.h
+++ b/strbuf.h
@@ -102,6 +102,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')