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: 67719
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: SJOHNSTON [...] cpan.org
Cc:
AdminCc:

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



Subject: Newline after form tags
The functions startform and start_form add a newline after the form tag. Newlines around input elements can cause unexpected rendering in the browser. It would be better if no extra newlines where added.
Subject: Re: [rt.cpan.org #67719] Newline after form tags
Date: Mon, 25 Apr 2011 09:35:07 -0400
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Show quoted text
> The functions startform and start_form add a newline after the form tag. > Newlines around input elements can cause unexpected rendering in the > browser. It would be better if no extra newlines where added.
I agree with this change suggestion. People can use "CGI::Pretty" if they want automatic newlines in their HTML. Mark
From: eberg [...] bergbrains.com
Here's a quick reproduction: use CGI qw(:all); my $s = start_form(); warn "START_FORM: '$s'"; ...and a diff for the fix is attached.
Subject: CGI.pm-trailingCRInStartForm.diff
--- CGI-orig.pm 2011-10-28 17:55:38.000000000 -0400 +++ CGI.pm 2011-10-28 17:56:00.404283000 -0400 @@ -1953,7 +1953,7 @@ $action = qq(action="$action"); my($other) = @other ? " @other" : ''; $self->{'.parametersToAdd'}={}; - return qq/<form method="$method" $action enctype="$enctype"$other>\n/; + return qq/<form method="$method" $action enctype="$enctype"$other>/; } END_OF_FUNC @@ -1987,7 +1987,7 @@ $action = qq(action="$action"); my($other) = @other ? " @other" : ''; $self->{'.parametersToAdd'}={}; - return qq/<form method="$method" $action enctype="$enctype"$other>\n/; + return qq/<form method="$method" $action enctype="$enctype"$other>/; } END_OF_FUNC
Subject: Re: [rt.cpan.org #67719] Newline after form tags
Date: Wed, 02 Nov 2011 17:02:45 -0400
To: bug-cgi [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Thanks. We'll take it from here.
Thanks. Releasing today.