aboutsummaryrefslogtreecommitdiffstats
path: root/stattrans.pl
diff options
context:
space:
mode:
authorTobias Quathamer <toddy>2017-06-11 20:56:34 +0000
committerTobias Quathamer <toddy>2017-06-11 20:56:34 +0000
commitf7862cc2ae1c4bd0148af64a1c3148089389fde2 (patch)
treeaa65ddffa94ebfbffcebcfbef3c004585051de9d /stattrans.pl
parent84593de2ea1873d4193bf44c189f098ae58f3558 (diff)
Escape HTML special characters in maintainers names
CVS version numbers stattrans.pl: 1.125 -> 1.126
Diffstat (limited to 'stattrans.pl')
-rwxr-xr-xstattrans.pl10
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 = (
+ '&' => '&amp;', '>' => '&gt;', '<' => '&lt;',
+ q{"} => '&quot;', q{'} => '&#39;',
+ q{`} => '&#96;', '{' => '&#123;',
+ '}' => '&#125;'
+ );
$maintainer{"$lang/$file"} = $transcheck->maintainer();
+ $maintainer{"$lang/$file"} =~ s/([&><"'`{}])/$_escape_table{$1}/ge;
}
$count++;
$sizes{$file} = (stat "".($original{"english/$file"}||"english")."/".$file)[7];

© 2014-2024 Faster IT GmbH | imprint | privacy policy