freebsd / kyua

Port/Package build and test system
https://github.com/freebsd/kyua/wiki
BSD 3-Clause "New" or "Revised" License
149 stars 42 forks source link

Do not write out invalid characters to XML file. #147

Closed rodrigc closed 9 years ago

rodrigc commented 9 years ago

For special characters such as: <, >, or ', write them out to the file as: &#[decimal ASCII value];

Character Written to Appears in Jenkins to encode XML file test result viewer ========= ========== ================== < < <

       &#62;             >

' ' '

For characters which are listed as RestrictedChar in http://www.w3.org/TR/xml11/#charsets , these characters are completely invalid XML, and cannot even be escaped.

Character Written to Appears in Jenkins to encode XML file test result viewer ========= ========== ================== 0x08 &#8;  0x1F &#31; 

This will at least generate a valid XML file, but let us see where these restricted characters would appear in the output.

Fixes #136