[Rt-devel] [PATCH 3.7-RTIR-RELENG] XHTML nitpicks -
Widgets/Form/Boolean
Ruslan Zakirov
ruz at bestpractical.com
Tue Oct 30 12:31:32 EDT 2007
thanks, applied.
On 10/30/07, Jason Long <jlong at messiah.edu> wrote:
> Widgets/Form/Boolean generates code like this:
>
> <input type="radio" name="OldestTransactionsFirst" value="1" />Yes
> <input type="radio" name="OldestTransactionsFirst" value="0" />No
> <input type="radio" name="OldestTransactionsFirst"
> value="__empty_value__" checked="checked" />Use system default
>
> XHTML validator complains:
>
> value of attribute "checked" cannot be ""checked"";
> must be one of "checked" .
>
> The problem is we forgot to tell Mason not to escape HTML entities
> in that string. See patch below.
> ---
>
> html/Widgets/Form/Boolean | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/html/Widgets/Form/Boolean b/html/Widgets/Form/Boolean
> index f8e3a68..d5c698d 100644
> --- a/html/Widgets/Form/Boolean
> +++ b/html/Widgets/Form/Boolean
> @@ -69,13 +69,13 @@ $CurrentValue => undef,
> </%ARGS>
> % unless ( $Default ) {
> <input type="hidden" name="<% $Name %>" value="0" />\
> -<input type="checkbox" name="<% $Name %>" value="1" <% $CurrentValue? 'checked="checked"': '' %> />\
> +<input type="checkbox" name="<% $Name %>" value="1"<% $CurrentValue? ' checked="checked"': '' |n %> />\
> % } else {
> -<input type="radio" name="<% $Name %>" value="1" <% $CurrentValue? 'checked="checked"': '' %> />\
> +<input type="radio" name="<% $Name %>" value="1"<% $CurrentValue? ' checked="checked"': '' |n %> />\
> <% loc('Yes') %>
> -<input type="radio" name="<% $Name %>" value="0" <% defined $CurrentValue && !$CurrentValue? 'checked="checked"': '' %> />\
> +<input type="radio" name="<% $Name %>" value="0"<% defined $CurrentValue && !$CurrentValue? ' checked="checked"': '' |n %> />\
> <% loc('No') %>
> -<input type="radio" name="<% $Name %>" value="__empty_value__" <% !defined $CurrentValue? 'checked="checked"': '' %> />\
> +<input type="radio" name="<% $Name %>" value="__empty_value__"<% !defined $CurrentValue? ' checked="checked"': '' |n %> />\
> <% $DefaultLabel %>
> % }
> </%METHOD>
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
> SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
>
> If you sign up for a new RT support contract before December 31, we'll take
> up to 20 percent off the price. This sale won't last long, so get in touch today.
> Email us at sales at bestpractical.com or call us at +1 617 812 0745.
>
--
Best regards, Ruslan.
More information about the Rt-devel
mailing list