diff options
author | Matt Post <post@cs.jhu.edu> | 2019-04-26 21:24:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-26 21:24:07 +0300 |
commit | 63c450b40125f98d2d666f5bc3f439cf3fac326a (patch) | |
tree | c890e5a06a3d4b5ecfeebe0b8d44e285488564e0 /scripts/ems/support | |
parent | 187a75cb5596c8e4362c66c62de395e2b7d3a64a (diff) |
escape angle brackets
The script doesn't escape angle brackets which can result in bad SGML / XML output. This fixes that, although ideally, this should be implemented with a proper parser and dumper.
Diffstat (limited to 'scripts/ems/support')
-rwxr-xr-x | scripts/ems/support/wrap-xml.perl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/ems/support/wrap-xml.perl b/scripts/ems/support/wrap-xml.perl index 09ea2a2f8..52fc0c001 100755 --- a/scripts/ems/support/wrap-xml.perl +++ b/scripts/ems/support/wrap-xml.perl @@ -30,6 +30,8 @@ while(<SRC>) { elsif (/<seg/) { my $line = shift(@OUT); $line = "" if $line =~ /NO BEST TRANSLATION/; + $line =~ s/</</g; + $line =~ s/>/>/g; if (/<\/seg>/) { s/(<seg[^>]+> *).*(<\/seg>)/$1$line$2/i; $missing_end_seg = 0; |