summaryrefslogtreecommitdiff
path: root/source/fitz/xml.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-04-15 16:53:09 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-04-21 13:14:32 +0200
commite81bc6bbec5783e8e7edc00659ee9f4eba57cfbf (patch)
tree6a47214ac0c1f57cf2dbf3a2c34d1d85ee186a4b /source/fitz/xml.c
parent62b487f3304fb1ea5bc3356e0eed9721dd6cebf9 (diff)
downloadmupdf-e81bc6bbec5783e8e7edc00659ee9f4eba57cfbf.tar.xz
xml: Add a missing case of skipping linebreak after an opening tag.
Diffstat (limited to 'source/fitz/xml.c')
-rw-r--r--source/fitz/xml.c6
1 files changed, 5 insertions, 1 deletions
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;