Anonymous avatar Anonymous committed 2750348

Fixed #2411 -- Fixed some XHTML validation errors in admindocs pages. Thanks to James Wheare for the report and to Simon Greenhill for the patch.

Comments (0)

Files changed (4)

django/contrib/admindocs/templates/admin_doc/template_filter_index.html

     {% if library.grouper %}<p class="small quiet">To use these filters, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the filter.</p><hr />{% endif %}
     {% for filter in library.list|dictsort:"name" %}
     <h3 id="{{ library.grouper|default_if_none:"built_in" }}-{{ filter.name }}">{{ filter.name }}</h3>
-    <p>{{ filter.title }}</p>
-    <p>{{ filter.body }}</p>
+    {{ filter.title }}
+    {{ filter.body }}
     {% if not forloop.last %}<hr />{% endif %}
     {% endfor %}
 </div>

django/contrib/admindocs/templates/admin_doc/template_tag_index.html

     {% if library.grouper %}<p class="small quiet">To use these tags, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the tag.</p><hr />{% endif %}
     {% for tag in library.list|dictsort:"name" %}
     <h3 id="{{ library.grouper|default_if_none:"built_in" }}-{{ tag.name }}">{{ tag.name }}</h3>
-    <h4>{{ tag.title }}</h4>
-    <p>{{ tag.body }}</p>
+    <h4>{{ tag.title|striptags }}</h4>
+    {{ tag.body }}
     {% if not forloop.last %}<hr />{% endif %}
     {% endfor %}
 </div>

django/contrib/admindocs/templates/admin_doc/view_detail.html

 
 <h1>{{ name }}</h1>
 
-<h2 class="subhead">{{ summary }}</h2>
+<h2 class="subhead">{{ summary|striptags }}</h2>
 
-<p>{{ body }}</p>
+{{ body }}
 
 {% if meta.Context %}
 <h3>Context:</h3>

django/template/defaulttags.py

         {% endif %}
 
     Comparison operators are also available, and the use of filters is also
-    allowed, for example:
+    allowed, for example::
 
         {% if articles|length >= 5 %}...{% endif %}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.