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: 61396
Status: rejected
Priority: 0/
Queue: CGI

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

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



Subject: Can't include HTML in check box labels
This is a design bug that will have to be fixed in a manner that allows for backward compatibility (by providing an option to control which of the two behaviors are used). The labels for at least checkbox() and _box_group() should not have their HTML escaped. It is extremely useful (and, of course, valid) to use HTML to style the labels of radio buttons and check-boxes. It makes little sense to escape the HTML of these labels.
Subject: Re: [rt.cpan.org #61396] Can't include HTML in check box labels
Date: Thu, 16 Sep 2010 10:11:31 -0400
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Show quoted text
> This is a design bug that will have to be fixed in a manner that allows > for backward compatibility (by providing an option to control which of > the two behaviors are used). > > The labels for at least checkbox() and _box_group() should not have > their HTML escaped. It is extremely useful (and, of course, valid) to > use HTML to style the labels of radio buttons and check-boxes. It makes > little sense to escape the HTML of these labels.
How you propose fixing it? Perhaps an explicit "noescape" flag if you want to send raw HTML through? Mark
This issue is being marked as stalled until a specific patch or proposal is made. Mark
From: sthoenna [...] gmail.com
On Sat Nov 20 15:12:21 2010, MARKSTOS wrote: Show quoted text
> This issue is being marked as stalled until a specific patch or proposal > is made. > > Mark
Specific proposal: add an autoEscapeLabel method to allow $cgi->autoEscapeLabel(0) to turn off escaping of checkbox and _box_group (radio_group/checkbox_group) labels. $cgi->autoEscape(0) would still turn off all escaping, even for these fields. labels for scrolling_list and popup_menu would remain unchanged (since those must be text only). Does this sound reasonable enough that I should proceed with a patch?
CC: Yanick Champoux <yanick.champoux [...] gmail.com>, Lincoln Stein <lincoln.stein [...] gmail.com>
Subject: Re: [rt.cpan.org #61396] Wish: allow HTML in check box labels
Date: Mon, 29 Nov 2010 09:57:10 -0500
To: bug-CGI.pm [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
On 11/26/2010 05:48 PM, http://ysth.info/ via RT wrote: Show quoted text
> Queue: CGI.pm > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=61396 > > > On Sat Nov 20 15:12:21 2010, MARKSTOS wrote:
>> This issue is being marked as stalled until a specific patch or proposal >> is made. >> >> Mark
> > Specific proposal: > > add an autoEscapeLabel method to allow $cgi->autoEscapeLabel(0) to turn > off escaping of checkbox and _box_group (radio_group/checkbox_group) > labels. $cgi->autoEscape(0) would still turn off all escaping, even > for these fields. labels for scrolling_list and popup_menu would remain > unchanged (since those must be text only). > > Does this sound reasonable enough that I should proceed with a patch?
I will first confer with the other maintainers. Yanick, Lincoln, any opinions on this change request? Mark
Subject: Re: [rt.cpan.org #61396] Wish: allow HTML in check box labels
Date: Tue, 30 Nov 2010 21:06:09 -0500
To: bug-CGI.pm [...] rt.cpan.org
From: Yanick Champoux <yanick [...] babyl.dyndns.org>
On 10-11-29 09:57 AM, mark@summersault.com via RT wrote: Show quoted text
>> add an autoEscapeLabel method to allow $cgi->autoEscapeLabel(0) to turn >> off escaping of checkbox and _box_group (radio_group/checkbox_group) >> labels. $cgi->autoEscape(0) would still turn off all escaping, even >> for these fields. labels for scrolling_list and popup_menu would remain >> unchanged (since those must be text only). >> >> Does this sound reasonable enough that I should proceed with a patch?
> > I will first confer with the other maintainers. Yanick, Lincoln, any > opinions on this change request?
Alternatively, we could just add a '-escape_label' argument to checkbox() and _box_group(). At first brush, that would seem to be more to the point and less prone to effects from a distance that using a global variable. But I don't really have any huge opinion or feeling on the topic, only general preferences. Joy, `/anick
CC: tyemq [...] cpan.org
Subject: Re: [rt.cpan.org #61396] Wish: allow HTML in check box labels
Date: Wed, 1 Dec 2010 00:15:20 -0800
To: bug-CGI.pm [...] rt.cpan.org
From: Tye McQueen <tyemq [...] cpan.org>
My first reaction was that I'd rather not have to search out all my uses of button groups to add an option to each (I "fixed" this limitation a long time ago in my copies of CGI.pm). But I'd actually add a wrapper for those methods in my derived class instead. But I'd still personally prefer a global option and then I'd override the default not by passing in an "please auto escape this time option" but just by calling escapeHTML() myself (it is probably slightly less typing). So, I'm not against a per-call option if that is desired too (makes sense to me), but a global option is my preference, even if in addition to a per-call option. Thanks, Tye On Nov 30, 2010 6:06 PM, "yanick@babyl.dyndns.org via RT" < bug-CGI.pm@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=61396 > > > On 10-11-29 09:57 AM, mark@summersault.com via RT wrote:
>>> add an autoEscapeLabel method to allow $cgi->autoEscapeLabel(0) to turn >>> off escaping of checkbox and _box_group (radio_group/checkbox_group) >>> labels. $cgi->autoEscape(0) would still turn off all escaping, even >>> for these fields. labels for scrolling_list and popup_menu would remain >>> unchanged (since those must be text only). >>> >>> Does this sound reasonable enough that I should proceed with a patch?
>> >> I will first confer with the other maintainers. Yanick, Lincoln, any >> opinions on this change request?
> > Alternatively, we could just add a '-escape_label' argument to > checkbox() and _box_group(). At first brush, that would seem to be more > to the point and less prone to effects from a distance that using a > global variable. But I don't really have any huge opinion or feeling on > the topic, only general preferences. > > Joy, > `/anick >
This issue has been copied to: https://github.com/leejo/CGI.pm/issues/76 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Rejecting. I'm not accepting any feature requests, patches, or updates to the HTML generating functions of CGI.pm unless they are of a critical nature (i.e. fixing fundamentally broken HTML output).