Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2019-04-27 23:23:50 +0300
committerGitHub <noreply@github.com>2019-04-27 23:23:50 +0300
commitc0545019eb6877fca822dc8c7e4fccff6d1d231b (patch)
treec890e5a06a3d4b5ecfeebe0b8d44e285488564e0
parent187a75cb5596c8e4362c66c62de395e2b7d3a64a (diff)
parent63c450b40125f98d2d666f5bc3f439cf3fac326a (diff)
Merge pull request #210 from mjpost/patch-1
escape angle brackets
-rwxr-xr-xscripts/ems/support/wrap-xml.perl2
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/</&lt;/g;
+ $line =~ s/>/&gt;/g;
if (/<\/seg>/) {
s/(<seg[^>]+> *).*(<\/seg>)/$1$line$2/i;
$missing_end_seg = 0;