Parent Directory
|
Revision Log
++ ChangeLog 21 Jul 2007 04:58:03 -0000 2007-07-21 Wakaba <wakaba@suika.fam.cx> * cc-style.css: Don't remove bullet of the document node in the document tree. Don't collapse white space in the |code| elements. * cc.cgi: Put identifiers and class names into |code| element. (get_text): Template for attribute values are supported. * error-descriotion-source.en.xml: More error descriptions are included. Use |{@}| attribute value insertion macro for errors in which it should be useful.
| 1 | wakaba | 1.1 | #!/usr/bin/perl |
| 2 | use strict; | ||
| 3 | |||
| 4 | use lib qw[/home/httpd/html/www/markup/html/whatpm | ||
| 5 | /home/wakaba/work/manakai/lib | ||
| 6 | /home/wakaba/public_html/-temp/wiki/lib]; | ||
| 7 | use CGI::Carp qw[fatalsToBrowser]; | ||
| 8 | wakaba | 1.2 | use Scalar::Util qw[refaddr]; |
| 9 | wakaba | 1.1 | |
| 10 | use SuikaWiki::Input::HTTP; ## TODO: Use some better CGI module | ||
| 11 | |||
| 12 | wakaba | 1.2 | sub htescape ($) { |
| 13 | my $s = $_[0]; | ||
| 14 | $s =~ s/&/&/g; | ||
| 15 | $s =~ s/</</g; | ||
| 16 | $s =~ s/>/>/g; | ||
| 17 | $s =~ s/"/"/g; | ||
| 18 | wakaba | 1.12 | $s =~ s{([\x00-\x09\x0B-\x1F\x7F-\xA0\x{FEFF}\x{FFFC}-\x{FFFF}])}{ |
| 19 | sprintf '<var>U+%04X</var>', ord $1; | ||
| 20 | }ge; | ||
| 21 | wakaba | 1.2 | return $s; |