summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@redhat.com>2017-08-15 10:37:47 -0400
committerShaun McCance <shaunm@redhat.com>2017-08-15 10:37:47 -0400
commit14f428652bc44d0f65cf21f17afaf1e0b13f0336 (patch)
treec264d88814b857bc5023d64dc83dcd2d7e7be811
parent676f3f738b21ec4d77f300f83d31d2d0eceaddcc (diff)
downloaditstool-14f428652bc44d0f65cf21f17afaf1e0b13f0336.tar.gz
Fix keep entities mode after libxml2 changes
https://bugzilla.gnome.org/show_bug.cgi?id=762110
-rwxr-xr-xitstool.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/itstool.in b/itstool.in
index 75a602d..276f852 100755
--- a/itstool.in
+++ b/itstool.in
@@ -458,6 +458,7 @@ class Document (object):
if load_dtd:
ctxt.loadSubset(1)
if keep_entities:
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
ctxt.replaceEntities(0)
else:
ctxt.replaceEntities(1)
@@ -1014,6 +1015,7 @@ class Document (object):
ctxt = libxml2.createDocParserCtxt(blurb)
if self._load_dtd:
ctxt.loadSubset(1)
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
ctxt.replaceEntities(0)
ctxt.parseDocument()
trnode = ctxt.doc().getRootElement()