aboutsummaryrefslogtreecommitdiff
path: root/lib/framework.exp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/framework.exp')
-rw-r--r--lib/framework.exp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/framework.exp b/lib/framework.exp
index 20e254a..6cb93c5 100644
--- a/lib/framework.exp
+++ b/lib/framework.exp
@@ -65,7 +65,7 @@ proc open_logs { } {
if { $xml } {
catch "file delete -force -- $outdir/$tool.xml"
set xml_file [open [file join $outdir $tool.xml] w]
- xml_output "<?xml version=\"1.0\"?>"
+ xml_output "<?xml version=\"1.1\"?>"
insertdtd
xml_output "<testsuite>"
}
@@ -367,10 +367,14 @@ proc log_and_exit {} {
proc xml_tag { tag body } {
set escapes { < &lt; > &gt; & &amp; \" &quot; ' &apos; }
for {set i 1} {$i < 32} {incr i} {
+ if {[lsearch [list 9 10 13] $i] >= 0} {
+ # skip valid XML whitespace chars
+ continue
+ }
# Append non-printable character
lappend escapes [format %c $i]
# .. and then the corresponding XML escape
- lappend escapes &#[format %x $i]\;
+ lappend escapes &#x[format %x $i]\;
}
return <$tag>[string map $escapes $body]</$tag>
}