Defect #15191
closedHTML 5 validation failures
Added by Ksenia Altbregen almost 11 years ago. Updated over 10 years ago.
0%
Description
Asserted fixes for HTML 5. Part 1.
Files
html_validation_patch.diff (2.97 KB) html_validation_patch.diff | Ksenia Altbregen, 2013-10-24 15:02 | ||
html_validation_patch.diff (2.87 KB) html_validation_patch.diff | Revised patch | Ksenia Altbregen, 2013-10-25 11:38 |
Related issues
Updated by Etienne Massip almost 11 years ago
- Related to Defect #5475: Non conformances with W3C xhtml transitional standards added
Updated by Etienne Massip almost 11 years ago
- Category set to Code cleanup/refactoring
Please describe your patch, I don't get the default empty option displayed as an nbsp entity part and "notified_project_ids[]"
should remain 'notified_project_ids[]'
with single quotes, this is not JavaScript.
Updated by Ksenia Altbregen almost 11 years ago
Well, I used the W3C validator.
The default empty option is really displayed as an nbsp entity, but the generated code
<option value=""></option>
is non-valid, while the
<option value=""> </option>
is valid.
The code
check_box_tag( 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id))
did not work correctly; it did not convert notified_project_ids[] for each project to notified_project_ids_#{project.id}. The ids for all projects were identical.
I added the id parameter manually:
:id => "notified_project_ids_#{project.id}"
Now multiple ids work correctly.
Updated by Ksenia Altbregen almost 11 years ago
Quotes for notified_project_ids[] are single again, sorry.
Updated by Jean-Philippe Lang almost 11 years ago
- Tracker changed from Patch to Defect
- Subject changed from HTML 5 Validation Venture to HTML 5 validation failures
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 2.4.0
- Resolution set to Fixed
I fixed these issues more globally, see associated commits. Thanks for pointing this out.
Updated by Ksenia Altbregen over 10 years ago
In r12236 you've set
:id => nil
Is this really acceptable? The elements now have no ids at all.
I've also noticed that these elements have identical names.
Both problems could be fixed by explicit transmission of :id and :name values.
P.S. There are several places with this problem (e.g. user[group_ids][] and membership[role_ids][] in users/views).
Updated by Jean-Philippe Lang over 10 years ago
Ksenia Altbregen wrote:
In r12236 you've set [...]
Is this really acceptable? The elements now have no ids at all.
AFAIK, ids are not required. And they are not needed in this case, so I've set them to nil.
I've also noticed that these elements have identical names.
Yes, they have to have the same name to get the values as a single array parameter. Please, have a look at:
http://guides.rubyonrails.org/action_controller_overview.html#hash-and-array-parameters
Updated by Go MAEDA over 1 year ago
- Related to Defect #25337: Redmine patch for Rails breaks functionality of select_tag added