Merge pull request #210 from mjpost/patch-1

escape angle brackets
This commit is contained in:
Hieu Hoang 2019-04-27 21:23:50 +01:00 committed by GitHub
commit c0545019eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;