summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2017-05-05 16:52:19 +0000
committerjabiertxof <info@marker.es>2017-05-05 16:52:19 +0000
commitbec0359a0d5b3f7db96417f003927c282c18a9f4 (patch)
treee45fa17927826da138e233499060e3142de86899 /src/xml
parentUpdate to trunk (diff)
parentmerge lpeUpdDefaultParams (diff)
downloadinkscape-bec0359a0d5b3f7db96417f003927c282c18a9f4.tar.gz
inkscape-bec0359a0d5b3f7db96417f003927c282c18a9f4.zip
Update to trunk
(bzr r13645.1.174)
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/repr-io.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index ae6f238d4..d8e0f5418 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -404,7 +404,12 @@ Document *sp_repr_read_mem (const gchar * buffer, gint length, const gchar *defa
g_return_val_if_fail (buffer != NULL, NULL);
- doc = xmlParseMemory (const_cast<gchar *>(buffer), length);
+ int parser_options = XML_PARSE_HUGE | XML_PARSE_RECOVER;
+ parser_options |= XML_PARSE_NONET; // TODO: should we allow network access?
+ // proper solution would be to check the preference "/options/externalresources/xml/allow_net_access"
+ // as done in XmlSource::readXml which gets called by the analogous sp_repr_read_file()
+ // but sp_repr_read_mem() seems to be called in locations where Inkscape::Preferences::get() fails badly
+ doc = xmlReadMemory (const_cast<gchar *>(buffer), length, NULL, NULL, parser_options);
rdoc = sp_repr_do_read (doc, default_ns);
if (doc) {