summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-05-01 01:21:44 +0000
committerJabiertxof <jtx@jtx>2017-05-01 01:21:44 +0000
commit3be0cd064d48cfe0601d365fb52f729a776d462b (patch)
tree1b4f8c65753bc149ca39f7dac7b381c50351114e /src/xml
parentminor bugfixing (diff)
parentFix erase lpe in multi LPE mode (diff)
downloadinkscape-3be0cd064d48cfe0601d365fb52f729a776d462b.tar.gz
inkscape-3be0cd064d48cfe0601d365fb52f729a776d462b.zip
Update to trunk
(bzr r15620.1.14)
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) {