diff -r 78b42fd9e2c4 -r 0a42a7ed6d8d common/tools/brag/logToBRAG.pl --- a/common/tools/brag/logToBRAG.pl Mon Oct 05 11:22:09 2009 +0100 +++ b/common/tools/brag/logToBRAG.pl Mon Oct 05 11:33:00 2009 +0100 @@ -133,7 +133,7 @@ $tagName =~ s{^main::}{}; if ($tagName eq "Characters") { - print $tree->{Text}; + print escapeForXML($tree->{Text}); return; } @@ -173,3 +173,11 @@ print ">"; } +sub escapeForXML +{ + $_ = shift; + s{&}{&}g; + s{<}{<}g; + s{>}{>}g; + return $_; +}