X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/61672b1912da0a1b1669259718e04b268367f98e..132eb3a630a1f5966a133bbc6538996ae31326b1:/charset.plp
diff --git a/charset.plp b/charset.plp
index 73f9377..440cabe 100644
--- a/charset.plp
+++ b/charset.plp
@@ -1,21 +1,17 @@
-<:
-use utf8;
-use strict;
-use warnings;
-use open IO => ':utf8';
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = 'text/html; charset=utf-8';
+<(common.inc.plp)><:
+ our $VERSION = 'v1.0';
:>
-
+
charset cheat sheet
-
+
+
+<:= stylesheet(qw'light') :>
+
@@ -101,14 +97,6 @@ for my $cp437 (grep {$request[$_]->{set} eq 'cp437'} 0 .. $#request) {
);
}
-sub quote {
- local $_ = shift;
- s/"/"/g;
- s/</g;
- s/>/>/g;
- return $_;
-}
-
my @nibble = (0..9, 'A'..'F');
for my $row (@request) {
printf '', !$row->{cell} && ' charmap';
@@ -145,14 +133,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 = "$glyph" if $prop eq 'Zs';
printf "\n".'%s',
- join(' ', @class), quote($desc), $glyph;
+ join(' ', @class), EscapeHTML($desc), $glyph;
}
print "\n";
}
|