From 648ae8838f35f45e57b9a41f41f30a3b6ade3037 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 16 Apr 2014 16:10:57 +0200 Subject: Fix bug 693580 by skipping xml tag namespace prefixes. fts_5904.xps and fts_5905.xps use namespace prefixes. Work around that by ignoring the namespace prefix for tag names. A more robust solution would be to expand or record the tag and attribute namespaces in the fz_xml node structure, but that's a overkill for our current needs. --- source/fitz/xml.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/fitz') diff --git a/source/fitz/xml.c b/source/fitz/xml.c index 34a6b51e..1dd3512f 100644 --- a/source/fitz/xml.c +++ b/source/fitz/xml.c @@ -169,6 +169,12 @@ static inline int iswhite(int c) static void xml_emit_open_tag(struct parser *parser, char *a, char *b) { fz_xml *head, *tail; + char *ns; + + /* skip namespace prefix */ + for (ns = a; ns < b; ++ns) + if (*ns == ':') + a = ns + 1; head = fz_malloc_struct(parser->ctx, fz_xml); if (b - a > sizeof(head->name) - 1) -- cgit v1.2.3