:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
-<html>
+<html lang="en">
<head>
<meta http-equiv="content-type" content="<:= $header{content_type} :>">
<title>country code cheat sheet</title>
+<meta name="description" content="Table of ISO-3166-2 country codes with the names of reserved territories.">
+<meta name="keywords" content="country, code, cc, tld, territory, land, table">
<:= stylesheet(qw'light dark mono red') :>
+<link rel="icon" type="image/png" href="/clip.png">
</head>
<body>
<:
my $cc = do 'cc.inc.pl';
-sub quote {
- local $_ = shift;
- s/"/"/g;
- s/</</g;
- s/>/>/g;
- return $_;
-}
-
{
printf '<table class="mcmap">';
print '<col><colgroup span="26">';
s/North(?:ern)? /N-/g;
s/New /n./g;
s/(\S)(\S+)-/$1-/g; # strip most chars preceding dash
- s/(\S{4}[b-df-hj-np-tv-xz])(\w{2,})/$1./g; # abbreviate (at consonant)
- $_ = quote($_);
+ s/(\S{4}[b-df-hj-np-tv-xz])((?<!Austr)(?!land)\w{2,})/$1./g; # abbreviate (at consonant)
+ $_ = EscapeHTML($_);
}
$name =~ s/([^,]*), (.*)/$2 $1/;
printf "\n".'<td class="%s" title="%s">%s',
- $_ ? 'X '.$class : '', quote("$code: $name"), $_;
+ $_ ? 'X '.$class : '', EscapeHTML("$code: $name"), $_;
}
print "\n";
}