summaryrefslogtreecommitdiff
path: root/src/xml.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2015-05-09 15:57:35 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2015-05-14 14:36:01 +0200
commitda23f80b53d47c76a85ba163cb0fb426050f3738 (patch)
tree6e63fe0cead79a82f8d1ce27ef0b68e7d4114b27 /src/xml.c
parentbc5f16f146558a1faf9be6abe034755421f6ecce (diff)
Store link URL and title as cmark_chunk
Diffstat (limited to 'src/xml.c')
-rw-r--r--src/xml.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xml.c b/src/xml.c
index 845e553..acb2f3d 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -118,10 +118,12 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
case CMARK_NODE_LINK:
case CMARK_NODE_IMAGE:
cmark_strbuf_puts(xml, " destination=\"");
- escape_xml(xml, node->as.link.url, -1);
+ escape_xml(xml, node->as.link.url.data,
+ node->as.link.url.len);
cmark_strbuf_putc(xml, '"');
cmark_strbuf_puts(xml, " title=\"");
- escape_xml(xml, node->as.link.title, -1);
+ escape_xml(xml, node->as.link.title.data,
+ node->as.link.title.len);
cmark_strbuf_putc(xml, '"');
break;
default: