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

Bug#357171: www.debian.org: people.names contains invalid characters inside name attributes of anchors



Package: www.debian.org
Severity: normal
Tags: patch


Tidy is not happy with the name attributes used in people.$lang.html.

Name attributes cannot begin with numbers and cannot contain several
characters.

As I did not find any reference to the anchors, I'd suggest to change
the name attributes to something valid. The aplied Patch fpr people.pl
deletes whitespaces and replaces other characters by Underscores.
In the begining a "MAINT_" is added to have no numbers or underscores
there.

I used tr because it is faster than other substituting.


Jutta


-- System Information:
Debian Release: 3.1
Architecture: powerpc (ppc)
Kernel: Linux 2.6.8-powerpc
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)
--- people.pl.orig	2006-03-15 23:45:45.049695336 +0100
+++ people.pl	2006-03-16 01:52:56.375432896 +0100
@@ -60,14 +60,20 @@
 	   my $userid = $People{$names}{email};
 	   $userid =~ s/@.*//;
 	   if (!$ppl_ref{lc($userid)}) {
-	      print "<a name=\"$userid\"></a>";
+	      my $linkname = $userid;
+	      $linkname = "MAINT_" . $linkname;
+	      print "<a name=\"$linkname\"></a>";
 	      $ppl_ref{lc($userid)} = 1;
 	   }
         }
 	if ($ppl_ref{lc($lastname)}) {
            print "$lastname";
 	} else {
- 	   print "<a name=\"$lastname\">$lastname</a>";
+	      my $linkname = $lastname;
+	      $linkname =~ tr/ //d;
+	      $linkname =~ tr{/'+&\;#///}{_};
+	      $linkname = "MAINT_" . $linkname;
+ 	   print "<a name=\"$linkname\">$lastname</a>";
            $ppl_ref{lc($lastname)} = 1;
 	}
 	if ($lastname ne "Wookey") {

Reply to: