summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-13 04:17:37 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-13 04:17:37 +0000
commit991279702f188995eaf339994394ba0ea4d9e7a6 (patch)
tree4cda11330822097aae2cb256602343fe2a918f12 /src/xml
parentpreliminary release of the EMF import text reassembly feature. (diff)
parentMigrate document metadata from NotbookPage to Gtk::Grid and drop dead code (diff)
downloadinkscape-991279702f188995eaf339994394ba0ea4d9e7a6.tar.gz
inkscape-991279702f188995eaf339994394ba0ea4d9e7a6.zip
merge from trunk (r11952)
(bzr r11668.1.46)
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/repr-io.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index 29a5b4a78..1258617c7 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -297,12 +297,18 @@ Document *sp_repr_read_file (const gchar * filename, const gchar *default_ns)
XmlSource src;
if ( (src.setFile(filename) == 0) ) {
+ int parse_options = XML_PARSE_HUGE; // do not use XML_PARSE_NOENT ! see bug lp:1025185
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ bool allowNetAccess = prefs->getBool("/options/externalresources/xml/allow_net_access", false);
+ if (!allowNetAccess) {
+ parse_options |= XML_PARSE_NONET;
+ }
doc = xmlReadIO( XmlSource::readCb,
XmlSource::closeCb,
&src,
localFilename,
src.getEncoding(),
- XML_PARSE_NOENT | XML_PARSE_HUGE);
+ parse_options);
}
}