Closed (fixed)
Project:
Drupal core
Version:
4.6.4
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 May 2005 at 13:21 UTC
Updated:
2 Dec 2005 at 01:15 UTC
Attached patch makes Drupal forms slightly more valid. It removes "][" from ID attributes in forms and replaces it with a dash (-).
In the future, we might clean out more characters, but these ones are used throughout Drupal.
| Comment | File | Size | Author |
|---|---|---|---|
| form_clean_id.patch | 7.96 KB | Thox |
Comments
Comment #1
Steven commentedApplied to HEAD. Good catch. We had a similar problem with aggregator blocks, they used ':' in the id, which messed up CSS selecting (as : is for CSS pseudoclasses like :hover).
Perhaps we should use a regular expression which replaces anything that strips anything that is not a letter, number or dash? like:
Comment #2
dries commentedComment #3
(not verified) commentedComment #4
jasoncd commentedExcuse me if I'm being ignorant (first post), but it doesn't look fixed to me. In 4.6.2 to 4.6.4, the ][ are still there. For an example, look at the admin pages for access control and modules (checkboxes).
Comment #5
chx commentedSteven said "applied to HEAD" not "applied to HEAD and 4.6.x"...