[cmake-developers] CTest XML outputs unsafe content
Brad King
brad.king at kitware.com
Thu Aug 27 09:34:52 EDT 2015
On 08/27/2015 07:20 AM, Mathieu MARACHE wrote:
> I'm maintaining a CTest output parser for Bamboo. It was reported to me that
> CMake 3.3.1 produced parsing issues in my plugin. After digging into CMake
> source code, it seems that a bug was introduced with the replacement of
> direct use of cmXMLSafe and std::ostream in favor of cmXMLwriter.
For reference, the changes were here:
Merge topic 'ctest-xml-refactor'
http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=0c24c231
> cmXMLWriter is, I assume wrongly, output Safe content without
> (quotes, etc.) escaping.
The SafeContent method is for text inside an element like
<Element>ContentHere</Element>
The SafeAttribute method is for text inside an element attribute
<Element attr="AttributeHere"/>
The latter needs quotes to be encoded as """ but the former
does not:
http://www.w3.org/TR/xml11/#syntax
Have you found an attribute value that does not enocde quotes?
-Brad
More information about the cmake-developers
mailing list