#8440 closed (invalid)
Change forms default auto_id='id-%s'
Reported by: | Owned by: | cdleary | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hey all,
I don't think that the default auto_id for form fields is compatible with CSS1, since it starts with "id_". A la http://www.w3.org/TR/REC-CSS1#appendix-b:
unicode \\[0-9a-f]{1,4} latin1 [¡-ÿ] escape {unicode}|\\[ -~¡-ÿ] stringchar {escape}|{latin1}|[ !#$%&(-~] nmstrt [a-z]|{latin1}|{escape} nmchar [-a-z0-9]|{latin1}|{escape} ident {nmstrt}{nmchar}* name {nmchar}+
I believe it's a real simple patch (attached), but I haven't tested it rigorously.
Cheers,
Chris
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | auto_id.diff added |
---|
comment:2 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I figured the HTML was legal, but was questioning whether all browsers targeted by the Django framework support it as a CSS identifier. There are two different concerns, right?
As Dan said, w3c corrected it in CSS2.1 -- it's not in the CSS2 grammar either:
comment:3 by , 16 years ago
In my experience all browsers have supported _ in selectors for as long as I can remember.
comment:4 by , 16 years ago
milestone: | → post-1.0 |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
If you use a CSS validator, it will tell you there's nothing wrong with id_
selectors even in CSS 1.
The change would be backwards incompatible for no real reason.
Simple proposal auto_id patch.