countries: minor name cleanup (escape ampersands)
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 1 Feb 2015 08:25:34 +0000 (09:25 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 1 Feb 2015 17:34:57 +0000 (18:34 +0100)
Mostly invisible, but fixes html validation and drops useless replacement
intended to undo swapped names in old list.

countries.plp

index cd2040d..a2fa272 100644 (file)
@@ -40,9 +40,8 @@ my $cc = do 'countries.inc.pl';
                                $_ = sprintf '<img src="/%s" alt="%s">', $img, $ref if -e $img;
                        }
                        else {
-                               $_ = $short || $name;
+                               $_ = EscapeHTML($short || $name);
                        }
-                       $name =~ s/([^,]*), (.*)/$2 $1/;
                        printf "\n".'<td class="%s" title="%s">%s',
                                $_ ? 'X '.$class : '', EscapeHTML("$code: $name"), $_;
                }