--- a/common/tools/csvToSysDef.pl Wed Apr 07 14:03:14 2010 +0100
+++ b/common/tools/csvToSysDef.pl Fri Apr 09 10:34:32 2010 +0100
@@ -153,7 +153,14 @@
$tagName =~ s{^main::}{};
if ($tagName eq "Characters")
{
- print $tree->{Text};
+ if ($tree->{Text} =~ m{[<>&]})
+ {
+ print "<![CDATA[$tree->{Text}]]>";
+ }
+ else
+ {
+ print $tree->{Text};
+ }
return;
}
@@ -172,7 +179,11 @@
}
keys %$tree)
{
- print " $attr=\"$tree->{$attr}\"";
+ my $value_escaped = $tree->{$attr};
+ $value_escaped =~ s/&/&/g;
+ $value_escaped =~ s/</</g;
+ $value_escaped =~ s/>/>/g;
+ print " $attr=\"$value_escaped\"";
}
my $children = $tree->{Kids};