summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2017-09-13 20:10:55 +1000
committerBen Elliston <bje@gnu.org>2017-09-13 20:10:55 +1000
commitba3c2f39d59765bf37e7c91ba51d199e402df5ac (patch)
treedb79efe95dfce95655d862cef81a0d56f90ffe30
parenta5d5bd4f3a37f223d8820610950a16d8afeb8d3d (diff)
downloaddejagnu-ba3c2f39d59765bf37e7c91ba51d199e402df5ac.tar.gz
dejagnu-ba3c2f39d59765bf37e7c91ba51d199e402df5ac.tar.bz2
dejagnu-ba3c2f39d59765bf37e7c91ba51d199e402df5ac.zip
* lib/framework.exp (open_logs): Set XML version to 1.1.
(xml_tag): Skip valid whitespace chars (0x9, 0xA, 0xD). Include missing 'x' in escape sequence.
-rw-r--r--ChangeLog6
-rw-r--r--lib/framework.exp8
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b3500f..7bf05cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-13 Ben Elliston <bje@gnu.org>
+
+ * lib/framework.exp (open_logs): Set XML version to 1.1.
+ (xml_tag): Skip valid whitespace chars (0x9, 0xA, 0xD). Include
+ missing 'x' in escape sequence.
+
2017-08-29 Ben Elliston <bje@gnu.org>
Revert these changes:
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>
}