diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2020-12-25 15:05:28 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2021-01-04 16:21:24 +0300 |
commit | 6c2ce4b6b6dc16dba2897428d620548028d833dc (patch) | |
tree | d4d56288568d04b34fa81d00e80c039184abd93e /src | |
parent | 2d428198b14b7025775212264ddba68ca20b5d7a (diff) |
Escape special xml characters when writing metadata into the model file
This should fix #5577
Diffstat (limited to 'src')
-rw-r--r-- | src/libslic3r/Format/3mf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libslic3r/Format/3mf.cpp b/src/libslic3r/Format/3mf.cpp index eb4822634..e65bf185b 100644 --- a/src/libslic3r/Format/3mf.cpp +++ b/src/libslic3r/Format/3mf.cpp @@ -2251,7 +2251,7 @@ namespace Slic3r { stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; stream << "<" << MODEL_TAG << " unit=\"millimeter\" xml:lang=\"en-US\" xmlns=\"http://schemas.microsoft.com/3dmanufacturing/core/2015/02\" xmlns:slic3rpe=\"http://schemas.slic3r.org/3mf/2017/06\">\n"; stream << " <" << METADATA_TAG << " name=\"" << SLIC3RPE_3MF_VERSION << "\">" << VERSION_3MF << "</" << METADATA_TAG << ">\n"; - std::string name = boost::filesystem::path(filename).stem().string(); + std::string name = xml_escape(boost::filesystem::path(filename).stem().string()); stream << " <" << METADATA_TAG << " name=\"Title\">" << name << "</" << METADATA_TAG << ">\n"; stream << " <" << METADATA_TAG << " name=\"Designer\">" << "</" << METADATA_TAG << ">\n"; stream << " <" << METADATA_TAG << " name=\"Description\">" << name << "</" << METADATA_TAG << ">\n"; |