TextTest writes illegal char in xunit file CDATA section
Bug #1504043 reported by
Magnus Lyckå
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TextTest |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
TextTest seems to dump unfiltered (?) text into the CDATA sections of junit result files.
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="XXX" failures="1" tests="1" time="0" errors="0">
<properties/>
<testcase name="XXX" time="0" classname="XXX">
<failure type="differences" message="stdout different(+)">
<![CDATA[
...
Please don't allow e.g. form feed (#xC) here, since XML parsers will reject the file.
...
]]>
The following characters are allowed in CDATA ( as long as it's not ]]> ):
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
See http://
Changed in texttest: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Try to change to the following in the file texttestlib/ default/ batch/junitrepo rt.py
def _longMessage(self, test): test.state. freeText. replace( "]]>", "END_MARKER"))
message = escape(
return message
I believe you are also currently working in the same office as the original author of this code, who may be able to help further :)