diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index c5dbdac9c..50ac64aa4 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -911,7 +911,7 @@ std::string xml_escape(std::string text, bool is_marked/* = false*/) std::string::size_type pos = 0; for (;;) { - pos = text.find_first_of("\"\'&<>", pos); + pos = text.find_first_of("\"\'&<>\n\t", pos); if (pos == std::string::npos) break; @@ -922,7 +922,9 @@ std::string xml_escape(std::string text, bool is_marked/* = false*/) case '\'': replacement = "'"; break; case '&': replacement = "&"; break; case '<': replacement = is_marked ? "<" :"<"; break; - case '>': replacement = is_marked ? ">" :">"; break; + case '>': replacement = is_marked ? ">" : ">"; break; + case '\n': replacement = " "; break; + case '\t': replacement = " "; break; default: break; }