/[suikacvs]/test/html-whatpm/parser.cgi
Suika

Contents of /test/html-whatpm/parser.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sun May 20 08:14:48 2007 UTC (19 years, 2 months ago) by wakaba
Branch: MAIN
Changes since 1.3: +63 -1 lines
++ ChangeLog	20 May 2007 08:14:29 -0000
2007-05-19  Wakaba  <wakaba@suika.fam.cx>

	* parser-interface.en.html: A checkbox to
	enable DOM5 HTML conformance checking is added.

	* parser.cgi: Check DOM5 HTML conformance
	if |dom5| parameter is specified.

1 wakaba 1.1 #!/usr/bin/perl
2     use strict;
3    
4 wakaba 1.2 use lib qw[/home/httpd/html/www/markup/html/whatpm
5     /home/wakaba/public_html/-temp/wiki/lib];
6 wakaba 1.1
7     use SuikaWiki::Input::HTTP; ## TODO: Use some better CGI module
8    
9     my $http = SuikaWiki::Input::HTTP->new;
10    
11     ## TODO: _charset_
12    
13     my $mode = $http->meta_variable ('PATH_INFO');
14     ## TODO: decode unreserved characters
15    
16 wakaba 1.2 if ($mode eq '/html' or $mode eq '/test') {
17 wakaba 1.1 require Encode;
18 wakaba 1.3 require Whatpm::HTML;
19     require Whatpm::NanoDOM;
20 wakaba 1.1
21     my $s = $http->parameter ('s');
22     if (length $s > 1000_000) {