From e81bc6bbec5783e8e7edc00659ee9f4eba57cfbf Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 15 Apr 2016 16:53:09 +0200 Subject: xml: Add a missing case of skipping linebreak after an opening tag. --- source/fitz/xml.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/fitz/xml.c b/source/fitz/xml.c index 31565980..b7804fc4 100644 --- a/source/fitz/xml.c +++ b/source/fitz/xml.c @@ -551,7 +551,11 @@ parse_attributes: while (iswhite(*p)) ++p; if (isname(*p)) goto parse_attribute_name; - if (*p == '>') { ++p; goto parse_text; } + if (*p == '>') { + ++p; + if (*p == '\n') ++p; /* must skip linebreak immediately after an opening tag */ + goto parse_text; + } if (p[0] == '/' && p[1] == '>') { xml_emit_close_tag(ctx, parser); p += 2; -- cgit v1.2.3