XHTML nitpicks - Widgets/Form/Boolean

Widgets/Form/Boolean generates code like this:

Yes
No
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=“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>

thanks, applied.On 10/30/07, Jason Long jlong@messiah.edu wrote:

Widgets/Form/Boolean generates code like this:

Yes
No
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=“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: The rt-devel Archives

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@bestpractical.com or call us at +1 617 812 0745.

Best regards, Ruslan.

I’ve got more XHTML cleanups…

Is RTIR-RELENG the best “upstream” target at this time?

Also, what form is easiest?

  • separate email for each patch, patch in the message body
  • separate email for each patch, patch attached to the email (not sure if
    my tools let me do that)
  • bunch of patches in a single email, a tarball/zip file

Jason

I’ve got more XHTML cleanups…

Is RTIR-RELENG the best “upstream” target at this time?
yes, but only for real fixes.

Also, what form is easiest?

  • separate email for each patch, patch in the message body
  • separate email for each patch, patch attached to the email (not sure if
    my tools let me do that)
  • bunch of patches in a single email, a tarball/zip file
    second option is preferred, then first and the latter is not acceptable.

Jason

Best regards, Ruslan.