+{
+ size_t i;
+
+ for (i = 0; i < sz; i++) {
+ switch (buf[i]) {
+ case ('&'):
+ if ( ! md_buf_puts(p->mbuf, "&", 5))
+ return(0);
+ p->pos += 5;
+ break;
+ case ('"'):
+ if ( ! md_buf_puts(p->mbuf, """, 6))
+ return(0);
+ p->pos += 6;
+ break;
+ default:
+ if ( ! md_buf_putchar(p->mbuf, buf[i]))
+ return(0);
+ p->pos++;
+ break;
+ }
+ }
+ return(1);
+}
+
+
+static int
+mbuf_nputs(struct md_xml *p, const char *buf, size_t sz)