diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-12-16 05:41:25 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-12-16 05:41:25 +0000 |
| commit | 7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch) | |
| tree | a306139e829118a83516af02279c9eafd3440eaa /src/xml/repr-io.cpp | |
| parent | Hershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff) | |
| parent | Translations.Spanish translation update by Lucas Vieites. (diff) | |
| download | inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip | |
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/xml/repr-io.cpp')
| -rw-r--r-- | src/xml/repr-io.cpp | 8 |
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); } } |
