red styling for index and unicode
[sheet.git] / unicode.plp
index ac631704979da9c6db8303200b04b71a467f708b..79ba220aa286bfbc8ea3a093681e1e348f09181e 100644 (file)
@@ -8,7 +8,7 @@
 <head>
 <meta http-equiv="content-type" content="utf-8">
 <title>digraph cheat sheet</title>
 <head>
 <meta http-equiv="content-type" content="utf-8">
 <title>digraph cheat sheet</title>
-<:= stylesheet(qw'light dark') :>
+<:= stylesheet(qw'light dark red') :>
 </head>
 
 <body id="unicode">
 </head>
 
 <body id="unicode">
@@ -24,14 +24,6 @@ my $diinfo = do 'digraphs.inc.pl';
 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
        sort { length $a <=> length $b } keys %$diinfo;
 
 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
        sort { length $a <=> length $b } keys %$diinfo;
 
-sub quote {
-       local $_ = shift;
-       s/"/&quot;/g;
-       s/</&lt;/g;
-       s/>/&gt;/g;
-       return $_;
-}
-
 sub glyph_table {
        my ($digraphs) = @_;
 
 sub glyph_table {
        my ($digraphs) = @_;
 
@@ -109,8 +101,8 @@ sub glyph_table {
                        defined $name  ? qq{ title="$name"}  : '',
                        @class ? sprintf(' class="%s"', join ' ', @class) : '',
                        $colspan > 1 && qq{ colspan="$colspan"},
                        defined $name  ? qq{ title="$name"}  : '',
                        @class ? sprintf(' class="%s"', join ' ', @class) : '',
                        $colspan > 1 && qq{ colspan="$colspan"},
-                       $cell eq '' ? '&nbsp;' : quote($cell),
-                       defined $code ? sprintf(' <small class="digraph">%s</small>', quote($code))
+                       $cell eq '' ? '&nbsp;' : EscapeHTML($cell),
+                       defined $code ? sprintf(' <small class="digraph">%s</small>', EscapeHTML($code))
                                : length($cell) == 1 && $cell !~ /[a-z]/
                                        ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
                                        : '',
                                : length($cell) == 1 && $cell !~ /[a-z]/
                                        ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
                                        : '',