Opened 15 years ago
Closed 15 years ago
#11252 closed (fixed)
Invalid XHTML when filtering a paginated list
Reported by: | daemondazz | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The admin sites generates invalid XHTML when viewing a filtered list of objects and that list needs to be paginated. The invalid tags are the links for jumping to different pages in the result set which have query string like "?p=2&domain__exact=1
" instead of "?p=2&domain__exact=1
".
This manifests if the site has
DEFAULT_CONTENT_TYPE = 'application/xhtml+xml'
set in the settings file: Firefox displays an error message about the invalid XHTML code and is not able to show the page.
The culprit in this case is passing the results of urllib.urlencode directly back to the HTML without fixing the amperstands.
Patch to be attached in a moment.
Attachments (2)
Change History (8)
by , 15 years ago
Attachment: | django_admin_pagination_fixamperstands.patch added |
---|
comment:1 by , 15 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | 1.0 → SVN |
Should just use escape
by , 15 years ago
Attachment: | django_admin_pagination_escape.patch added |
---|
Updated patch using escape()
comment:3 by , 15 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:4 by , 15 years ago
Any movement on this ticket? I still need to apply the patch against 1.1
comment:5 by , 15 years ago
Bring up requests like this in the django developers google group.
If you wanted to make this patch better, you could write a test too.
comment:6 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch to wrap the return of urllib.urlencode in fix_amperstands