Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 60473
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: giecrilj [...] stegny.2a.pl
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: CGI: -dtd option not documented enough
Download (untitled) / with headers
text/plain 392b
This issue first reported in the Perl core at http://rt.perl.org/rt3/Public/Bug/Display.html?id=75796 ----------------------------------------------------------------- The CGI documentation page [1] mentions the option -dtd for start_html but it does not document what values can actually be used for that option. [1] <URL:http://perldoc.perl.org/CGI.html#CREATING-THE-HTML-DOCUMENT-HEADER>
Download (untitled) / with headers
text/plain 506b
On Wed Aug 18 10:24:55 2010, steve@fisharerojo.org wrote: Show quoted text
> This issue first reported in the Perl core at > http://rt.perl.org/rt3/Public/Bug/Display.html?id=75796 > > ----------------------------------------------------------------- > The CGI documentation page [1] mentions the option -dtd for start_html > but it > does not document what values can actually be used for that option. > > [1] <URL:http://perldoc.perl.org/CGI.html#CREATING-THE-HTML-DOCUMENT-
Show quoted text
HEADER>
A suggestion for a fix is welcome.
From: giecrilj [...] stegny.2a.pl
Download (untitled) / with headers
text/plain 1.2k
On Śr 18 Aug 2010, 10:48:23, MARKSTOS wrote: Show quoted text
> On Wed Aug 18 10:24:55 2010, steve@fisharerojo.org wrote:
> > This issue first reported in the Perl core at > > http://rt.perl.org/rt3/Public/Bug/Display.html?id=75796 > > > > ----------------------------------------------------------------- > > The CGI documentation page [1] mentions the option -dtd for
start_html Show quoted text
> > but it > > does not document what values can actually be used for that option. > > > > [1] <URL:http://perldoc.perl.org/CGI.html#CREATING-THE-HTML-
DOCUMENT- Show quoted text
> HEADER>
> > A suggestion for a fix is welcome.
I am not LDS so I can only try to figure out what the current implementation does. It seems that the -dtd option can take a public DTD identifier string (e.g. -dtd => '-//W3C//DTD HTML 4.01 Transitional//EN') or public and system DTD identifiers as an array (e.g. -dtd => [ '-//W3C//DTD HTML 4.01 Transitional//EN', 'http://www.w3.org/TR/html4/loose.dtd' ]). For the public DTD identifier to be considered, it must be valid, where the exact meaning of the latter term is better left undefined, except for the provision that valid public DTD identifiers are accepted. Otherwise it will be replaced by the default DTD. If the public DTD contains 'XHTML', CGI will emit XML.
Subject: Re: [rt.cpan.org #60473] CGI: -dtd option not documented enough
Date: Fri, 20 Aug 2010 09:35:31 -0400
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 805b
Show quoted text
> I am not LDS so I can only try to figure out what the current > implementation does. It seems that the -dtd option can take a public > DTD identifier string (e.g. -dtd => '-//W3C//DTD HTML 4.01 > Transitional//EN') or public and system DTD identifiers as an array > (e.g. -dtd => [ '-//W3C//DTD HTML 4.01 > Transitional//EN', 'http://www.w3.org/TR/html4/loose.dtd' ]). For the > public DTD identifier to be considered, it must be valid, where the > exact meaning of the latter term is better left undefined, except for > the provision that valid public DTD identifiers are accepted. > Otherwise it will be replaced by the default DTD. > > If the public DTD contains 'XHTML', CGI will emit XML.
Thanks. Someone will peer review your suggestion and see about making an update. Mark
Thanks, a patch for this is now in our git repo.
From: giecrilj [...] stegny.2a.pl
Download (untitled) / with headers
text/plain 305b
On Sob 20 Lis 2010, 15:48:24, MARKSTOS wrote: Show quoted text
> Thanks, a patch for this is now in our git repo.
It should be noted that the DTD option does not affect the rendering of the HTML tag itself, which is always rendered in XML mode (bug). Workaround: call start_html twice, print only the second invocation.
This was released some time ago. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.