[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/02: r/html_reports: Fix issue with unquoted <> on maintainers.html



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 691475bf2f30739e5aabcfab2873e962479d1d01
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Oct 9 20:58:11 2014 +0200

    r/html_reports: Fix issue with unquoted <> on maintainers.html
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 reporting/html_reports               | 10 ++++++----
 reporting/templates/maintainers.tmpl |  8 +++++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/reporting/html_reports b/reporting/html_reports
index a910af2..18518d0 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -466,7 +466,7 @@ undef $source_info;
 # a summary page of errors and warnings for each maintainer, output a full
 # page that includes info, experimental, and overriden tags, and assemble the
 # maintainer index and the QA package list as we go.
-my (%qa, %maintainers, %sources);
+my (%qa, %maintainer_table, %sources);
 my @maintainers = sort(uniq(keys(%by_maint), keys(%by_uploader)));
 
 for my $maintainer (@maintainers) {
@@ -526,12 +526,13 @@ for my $maintainer (@maintainers) {
     # Create the regular maintainer page (only errors and warnings) and the
     # full maintainer page (all tags, including overrides and info tags).
     print "Generating page for $id\n";
+    my $q_name = html_quote($name);
     my %data = (
         email      => html_quote(uri_escape($email)),
         errors     => 1,
         id         => $id,
         maintainer => html_quote($maintainer),
-        name       => html_quote($name),
+        name       => $q_name,
         packages   => $by_maint{$maintainer},
         uploads    => $by_uploader{$maintainer},
     );
@@ -546,12 +547,13 @@ for my $maintainer (@maintainers) {
     $data{errors} = 0;
     output_template($full, $template, \%data);
 
+    my %index_data = (url => $id, name => $q_name);
     # Add this maintainer to the hash of maintainer to URL mappings.
-    $maintainers{$maintainer} = $id;
+    $maintainer_table{$maintainer} = \%index_data;
 }
 
 # Write out the maintainer index.
-my %data = (maintainers => \%maintainers,);
+my %data = (maintainers => \%maintainer_table,);
 output_template('maintainers.html', $templates{maintainers}, \%data);
 
 mkdir("$HTML_TMP_DIR/lookup-tables");
diff --git a/reporting/templates/maintainers.tmpl b/reporting/templates/maintainers.tmpl
index fc0be11..f7e5373 100644
--- a/reporting/templates/maintainers.tmpl
+++ b/reporting/templates/maintainers.tmpl
@@ -19,9 +19,11 @@
     # assured we'll get combining characters right, just accumulate them
     # under a heading of Other.
     my $letter = '';
-    for my $maintainer (sort { lc ($a) cmp lc ($b) } keys %maintainers) {
-        my ($url) = $maintainers{$maintainer};
-        my $first = uc substr($maintainer, 0, 1);
+    for my $key (sort { lc ($a) cmp lc ($b) } keys %maintainers) {
+        my $maint_data = $maintainers{$key};
+        my $url = $maint_data->{url};
+        my $maintainer = $maint_data->{name};
+        my $first = uc substr($key, 0, 1);
         if ($first lt 'A' || $first gt 'Z') {
             $first = 'Other';
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: