On Feb 26, 2:24 am, Ralph Shnelvar
<li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> I''m looking at
>
> \InstantRails-2.0-win\ruby\lib\ruby\gems\1.8\gems\actionpack-2.3.5\lib\acti
on_view\helpers\form_helper.rb
>
> at line 509. The comment reads:
>
> # label(:post, :title, "A short title")
> # # => <label for="post_title">A short
title</label>
>
> When I pass
> <label for="post_title">A short title</label>
> through an HTML validator (e.g.http://validator.w3.org/check)... the
> message I get is
>
> - - - -
> value of attribute "for" must be a single token
>
> This attribute can not take a space-separated list of words as a value,
> but only one word ("token"). This may also be caused by the use
of a
> space for the value of an attribute which does not permit it.
> - - - -
>
> What I think the validator is looking for is this
> <label for=post_title>A short title</label>
> instead of
> <label for="post_title">A short title</label>
>
> Am I interpreting this correctly?
No, I think you''ve somehow confused the validator. I was able to get
the error message you described, but only by changing the underscore
to a space. The version without attributes is also very wrong if
you''re using an XHMTML doctype.
--Matt Jones
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.