diff options
author | Tobias Quathamer <toddy> | 2017-06-11 20:56:34 +0000 |
---|---|---|
committer | Tobias Quathamer <toddy> | 2017-06-11 20:56:34 +0000 |
commit | f7862cc2ae1c4bd0148af64a1c3148089389fde2 (patch) | |
tree | aa65ddffa94ebfbffcebcfbef3c004585051de9d /stattrans.pl | |
parent | 84593de2ea1873d4193bf44c189f098ae58f3558 (diff) |
Escape HTML special characters in maintainers names
CVS version numbers
stattrans.pl: 1.125 -> 1.126
Diffstat (limited to 'stattrans.pl')
-rwxr-xr-x | stattrans.pl | 10 |
1 files changed, 10 insertions, 0 deletions
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]; |