diff --git a/src/libxml2_loader.cpp b/src/libxml2_loader.cpp index 447a1b0be..5c6ed4c8a 100644 --- a/src/libxml2_loader.cpp +++ b/src/libxml2_loader.cpp @@ -107,7 +107,7 @@ public: base_path + "': file or directory does not exist"); } } - + // NOTE: base_path here helps libxml2 resolve entities correctly: https://github.com/mapnik/mapnik/issues/440 xmlDocPtr doc = xmlCtxtReadMemory(ctx_, buffer.data(), buffer.length(), base_path.c_str(), encoding_, options_); load(doc, node); diff --git a/src/rapidxml_loader.cpp b/src/rapidxml_loader.cpp index 4a5e07ccc..4ede18d67 100644 --- a/src/rapidxml_loader.cpp +++ b/src/rapidxml_loader.cpp @@ -97,8 +97,9 @@ public: } } - void load_string(std::string const& buffer, xml_node &node, std::string const & base_path ) + void load_string(std::string const& buffer, xml_node &node, std::string const & ) { + // Note: base_path ignored because its not relevant - only needed for xml2 to load entities (see libxml2_loader.cpp) load_array(std::string(buffer), node); } private: