add meta data (language, description, keywords)
[sheet.git] / charset.plp
index 29e7e23c5fb6030271b9f5dc57105aca7aed1003..5931b5c39b2df1cf0540b6dd07be164d7c98b027 100644 (file)
@@ -3,11 +3,13 @@
 
 :><!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>charset cheat sheet</title>
+<meta name="description" content="Reference sheet with all glyphs in common character encoding tables, and an overview of Unicode ranges and UTF-8 bytes.">
+<meta name="keywords" content="charset, codepage, unicode, ascii, utf8, latin, glyph, character, encoding, reference, common, overview, table">
 <:= stylesheet(qw'light') :>
 </head>
 
@@ -94,14 +96,6 @@ for my $cp437 (grep {$request[$_]->{set} eq 'cp437'} 0 .. $#request) {
        );
 }
 
-sub quote {
-       local $_ = shift;
-       s/"/&quot;/g;
-       s/</&lt;/g;
-       s/>/&gt;/g;
-       return $_;
-}
-
 my @nibble = (0..9, 'A'..'F');
 for my $row (@request) {
        printf '<div class="section"><table class="glyphs%s">', !$row->{cell} && ' charmap';
@@ -138,14 +132,14 @@ for my $row (@request) {
                        }
                        my ($codepoint, $name, $prop, $script, $string) = @$info;
 
-                       $glyph = quote($string || $glyph);
+                       $glyph = EscapeHTML($string || $glyph);
                        my $desc = sprintf 'U+%04X%s', $codepoint, $name && " ($name)";
                        my @class = ('X', grep {$_} $prop, $script);
 
                        $glyph = "<span>$glyph</span>" if $prop eq 'Zs';
 
                        printf "\n".'<td class="%s" title="%s">%s',
-                               join(' ', @class), quote($desc), $glyph;
+                               join(' ', @class), EscapeHTML($desc), $glyph;
                }
                print "\n";
        }