termcol: enable dark page styling
[sheet.git] / cc.plp
diff --git a/cc.plp b/cc.plp
index 847324176763bdaa7e675c47c1fe363f48f4e688..7d1b0d86d7d36e5cc68f58a12af75da114d51551 100644 (file)
--- a/cc.plp
+++ b/cc.plp
@@ -3,12 +3,15 @@
 
 :><!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/"/&quot;/g;
-       s/</&lt;/g;
-       s/>/&gt;/g;
-       return $_;
-}
-
 {
        printf '<table class="mcmap">';
        print '<col><colgroup span="26">';
@@ -62,12 +57,12 @@ sub quote {
                                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";
        }