Skip to content

Commit

Permalink
Merge pull request ceph#26220 from ashitakasam/master
Browse files Browse the repository at this point in the history
common/Formatter: escape printed buffer in XMLFormatter::dump_format_va()

Reviewed-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov authored Mar 24, 2019
2 parents 25ae57b + 99f1d63 commit 62153b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/Formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ void XMLFormatter::dump_format_va(const char* name, const char *ns, bool quoted,

print_spaces();
if (ns) {
m_ss << "<" << e << " xmlns=\"" << ns << "\">" << buf << "</" << e << ">";
m_ss << "<" << e << " xmlns=\"" << ns << "\">" << xml_stream_escaper(std::string_view(buf, len)) << "</" << e << ">";
} else {
m_ss << "<" << e << ">" << xml_stream_escaper(std::string_view(buf, len)) << "</" << e << ">";
}
Expand Down

0 comments on commit 62153b3

Please sign in to comment.