Opened 11 years ago
Closed 11 years ago
#24466 closed Cleanup/optimization (fixed)
Improve consistency of JavaScript escaping in the admin
| Reported by: | Tim Graham | Owned by: | Tim Graham |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Escaping of values inserted into JavaScript code should always be done in the template rather than in the view (since context values could be reused in a template outside of JavaScript where JS escaping isn't desired). Some values like model verbose_name aren't currently escaped and it wouldn't hurt to add escaping there.
Note:
See TracTickets
for help on using tickets.
PR