From 416c609b9cd066f5556d05e94f1d6307090ee865 Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Thu, 8 May 2014 08:54:08 +1000 Subject: [PATCH] Change gumxml to remove (some) prohibited characters from XML --- site_ansto/instrument/gumxml.tcl | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/site_ansto/instrument/gumxml.tcl b/site_ansto/instrument/gumxml.tcl index 32da525e..47e04260 100644 --- a/site_ansto/instrument/gumxml.tcl +++ b/site_ansto/instrument/gumxml.tcl @@ -4,11 +4,43 @@ proc getdataType {path} { proc encode {str} { set result [string map -nocase { - {"} {"} + "\"" {"} {'} {'} {<} {<} {>} {>} {&} {&} + \u0 {} + \u1 {} + \u2 {} + \u3 {} + \u4 {} + \u5 {} + \u6 {} + \u7 {} + \u8 {} + \u9 { } + \ua { } + \ub {} + \uc {} + \ud { } + \ue {} + \uf {} + \u10 {} + \u11 {} + \u12 {} + \u13 {} + \u14 {} + \u15 {} + \u16 {} + \u17 {} + \u18 {} + \u19 {} + \u1a {} + \u1b {} + \u1c {} + \u1d {} + \u1e {} + \u1f {} } $str] return $result }