From: lace <> Date: Fri, 31 Mar 2006 02:12:00 +0000 (+0000) Subject: Improved HTML vs. XHTML output validity. X-Git-Url: https://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=commitdiff_plain;h=3223fdc8be6fe508131133b9cd400bf021584ea0 Improved HTML vs. XHTML output validity. --- diff --git a/project/Pod2Html.pm b/project/Pod2Html.pm index 2c785f4..a715162 100755 --- a/project/Pod2Html.pm +++ b/project/Pod2Html.pm @@ -41,8 +41,11 @@ my $W=My::Web->init( # From: # Do not: "content_type"=>"text/html", # or whatever as pod2html(1) already produces XHTML. - "header_only"=>"xml", + # Do not: "header_only"=>"xml", + # as pod2html(1) already provides the header. "header_only"=>1, + # Match the pod2html(1) tag. + "charset"=>"utf-8", "http_safe"=>0, # lynx(1) downloads. ); My::Web->heading(); @@ -53,6 +56,9 @@ open F,"lynx -source ".$W->{"project_viewcvs"}."*checkout*/".$W->{"args"}{"cvs"} # FIXME: "/tmp" - dangerous, not unique, currently creates: pod2htmd.tmp pod2htmi.tmp ." |pod2html --cachedir=/tmp -" ." |"; +my $first=; +$first=undef() if $first && $W->{"content_type"} eq "text/html" && $first=~/^\Q\E\s*$/s; +print $first if $first; print $_ while ; close F;