use EscapeHTML() from PLP v3.23
[sheet.git] / charset.plp
index 29e7e23c5fb6030271b9f5dc57105aca7aed1003..66e0cc98211badf52621d4ba0281fb733d27bc21 100644 (file)
@@ -94,14 +94,6 @@ for my $cp437 (grep {$request[$_]->{set} eq 'cp437'} 0 .. $#request) {
        );
 }
 
-sub quote {
-       local $_ = shift;
-       s/"/"/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 +130,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";
        }