Defect #15191
closedHTML 5 validation failures
Added by Ksenia Altbregen about 13 years ago. Updated about 13 years ago.
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 |
Updated by Ksenia Altbregen about 13 years ago
Actions
#1
Connected to Defect #5475.
Updated by Etienne Massip about 13 years ago
Actions
#2
- Related to Defect #5475: Non conformances with W3C xhtml transitional standards added
Updated by Etienne Massip about 13 years ago
Actions
#3
- 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 about 13 years ago
Actions
#4
Well, I used the W3C validator.
The default empty option is really displayed as an nbsp entity, but the generated code
is non-valid, while the
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:
Now multiple ids work correctly.
Updated by Ksenia Altbregen about 13 years ago
Actions
#5
Quotes for notified_project_ids[] are single again, sorry.
Updated by Jean-Philippe Lang about 13 years ago
Actions
#6
- 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 about 13 years ago
Actions
#7
In r12236 you've set
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 about 13 years ago
Actions
#8
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 3 years ago
Actions
#9
- Related to Defect #25337: Redmine patch for Rails breaks functionality of select_tag added