#2411 closed defect (fixed)
Validation errors in template filters/tags documentation
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | documentation, admin, docstring, validation, html |
Cc: | dev@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The documentation pages in the built in admin have swathes of HTML validation errors mainly involving nested p tags. These occur in the template tags/filters and views pages. This is probably due to idiosyncratic docstring->html parsing.
There are also some unescaped href attributes on the bookmarklets page due to the killer javascript-fu.
Attachments (1)
Change History (8)
comment:1 by , 18 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:3 by , 18 years ago
Has patch: | set |
---|
by , 18 years ago
Attachment: | admin_doc.diff added |
---|
comment:4 by , 18 years ago
... and for the record, the bookmarklets page validates quite happily, so this must have been fixed previously.
comment:5 by , 16 years ago
Patch needs improvement: | set |
---|
The patch needs significant updating, due to autoescape and possibly other changes.
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should fix most of them. The 5 outstanding errors should clear up once #3696 and #3695 are sorted out.
For the record, most of the errors were due to the use of
<p>{{ some_var }}</p>
- ReST automatically adds <p> tag anyway, so we were ending up with <p><p>...</p></p>. I've fixed this by just doing{{ some_var }}
.The next problem was related to this - ReST was generating <p> tags around things which we were putting into header tags. I've used the removetags filter to strip any <p>'s from header tags to stop this. It's likely that this could be replaced with striptags instead to remove all other html tags in the headers.
Finally, I've escaped a few variables that should have been escaped (mainly things which haven't gone through ReST like tag names,etc).