summaryrefslogtreecommitdiff
path: root/src/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml.c')
-rw-r--r--src/xml.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/xml.c b/src/xml.c
index 14f6d67..7eec5a6 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -11,14 +11,9 @@
// Functions to convert cmark_nodes to XML strings.
-static void escape_xml(cmark_strbuf *dest, const unsigned char *source, int length)
+static void escape_xml(cmark_strbuf *dest, const unsigned char *source, bufsize_t length)
{
- if (source != NULL) {
- if (length < 0)
- length = strlen((char *)source);
-
- houdini_escape_html0(dest, source, (size_t)length, 0);
- }
+ houdini_escape_html0(dest, source, length, 0);
}
struct render_state {