Opened 14 years ago
Closed 14 years ago
#17596 closed Bug (fixed)
Safestring in Admin Field Label quoted twice
| Reported by: | Thomas Güttler | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | hv@… | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
A Safestring in and admin field label gets quoted twice. Patch with unittest attached.
The patch is against trunk (updated today) and all unittests pass.
Attachments (2)
Change History (7)
comment:1 by , 14 years ago
| Patch needs improvement: | set |
|---|
by , 14 years ago
| Attachment: | safestring_in_admin_field_label.patch added |
|---|
comment:2 by , 14 years ago
| Patch needs improvement: | unset |
|---|
Improved test. All django unittests pass.
comment:3 by , 14 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
I don't see right away a good use case to pass a SafeString to a form label. Anyway, it does not harm to replace an escape by a conditional_escape, but no need to touch forms/forms.py for that (unless you show by a test that there is a problem there). I'm attaching my way of fixing this.
comment:4 by , 14 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Thank you claudep. Your solution (17594-2.diff) is better. I tested it, all unittests pass. I think it is read to commit.
I am updating the patch ...