Change to HTML::Parser made <!DOCTYPE> case-sensitive

Liam Quinn (liam@htmlhelp.com)
Sun, 29 Oct 2000 18:18:10 -0800


Hi,

A recent change (looks like 3.07 from the changelog) to HTML::Parser has
made <!DOCTYPE> case-sensitive, but I don't think this should be the
case (nsgmls is happy with either <!DOCTYPE> or <!doctype>).

I tested the following program with HTML::Parser 3.05 and 3.13:

#!/usr/bin/perl -w

use HTTP::Headers;
use HTML::HeadParser;

$h = HTTP::Headers->new;
$p = HTML::HeadParser->new($h);
$p->parse(<<EOT);
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
Foo

Foo

EOT undef $p; print $h->header('Content-Base') . "\n"; With HTML::Parser 3.05, the Content-Base is reported as "http://www.example.com/". With 3.13, the Content-Base is undefined. Changing to gives the desired Content-Base under both 3.05 and 3.13. -- Liam Quinn