From f7862cc2ae1c4bd0148af64a1c3148089389fde2 Mon Sep 17 00:00:00 2001 From: Tobias Quathamer Date: Sun, 11 Jun 2017 20:56:34 +0000 Subject: Escape HTML special characters in maintainers names CVS version numbers stattrans.pl: 1.125 -> 1.126 --- stattrans.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'stattrans.pl') diff --git a/stattrans.pl b/stattrans.pl index 935b76db074..1455b7302a7 100755 --- a/stattrans.pl +++ b/stattrans.pl @@ -180,7 +180,17 @@ sub getwmlfiles } } if ($transcheck->maintainer()) { + # Escape HTML special characters to make the resulting page valid. + # This is needed for maintainers who use their e-mail address + # within angle brackets. + my %_escape_table = ( + '&' => '&', '>' => '>', '<' => '<', + q{"} => '"', q{'} => ''', + q{`} => '`', '{' => '{', + '}' => '}' + ); $maintainer{"$lang/$file"} = $transcheck->maintainer(); + $maintainer{"$lang/$file"} =~ s/([&><"'`{}])/$_escape_table{$1}/ge; } $count++; $sizes{$file} = (stat "".($original{"english/$file"}||"english")."/".$file)[7]; -- cgit v1.2.3