[Boost-bugs] [Boost C++ Libraries] #11983: Boost Test XML Report contains unescaped XML characters

Subject: [Boost-bugs] [Boost C++ Libraries] #11983: Boost Test XML Report contains unescaped XML characters
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-02-13 19:26:15


#11983: Boost Test XML Report contains unescaped XML characters
-------------------------------+---------------------
 Reporter: m8mble <m8mble@…> | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: XML, Test, Report |
-------------------------------+---------------------
 I've encountered problems with the boost test reports in XML format. They
 contain unescaped characters ("<" and ">") in the TestCase name attribute
 for template tests. Here is a minimal example:

 {{{
 #define BOOST_TEST_MODULE huhu
 #include <boost/test/included/unit_test.hpp>
 #include <boost/test/test_case_template.hpp>
 #include <boost/mpl/list.hpp>

 typedef boost::mpl::list<int> types;

 BOOST_AUTO_TEST_CASE_TEMPLATE( test, Type, types ) {}
 }}}

 When running with `--report_format=XML --report_level=detailed`, this will
 include the following in the XML report:
 {{{
 <TestCase name="test<i>" result="passed"...
 }}}
 The "<" and ">" characters inside the name attribute must be escaped
 according to the XML specifications.

 I verified, that boost versions 1.53, 1.54 and 1.59 correctly escaped
 those characters. Interestingly , the unescaped characters appear in the
 XML report only. The XML logger is not affected for all boost versions
 including 1.60. When running with `--log_format=XML --log_level=all` any
 boost test version correctly prints
 {{{
 <TestCase name="test&lt;i&gt;" ...
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11983>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC