Commits

Anonymous committed f8f2a5d

Since docutils output XHTML, make the templates respect that.

  • Participants
  • Parent commits 3bbeb2e

Comments (0)

Files changed (5)

File sphinx/templates/genindex.html

    <a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %}
    {%- endfor %}
 
-   <hr>
+   <hr />
 
    {% for key, entries in genindexentries %}
 <h2 id="{{ key }}">{{ key }}</h2>

File sphinx/templates/layout.html

 {%- include "macros.html" %}
 {%- block doctype -%}
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-  "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 {%- endblock %}
 {%- macro relbar %}
 {# this macro needs to stay in layout.html due to it containing blocks #}
       </ul>
     </div>
 {%- endmacro %}
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     {%- if builder != 'htmlhelp' %}
       {%- set titlesuffix = " &mdash; " + docstitle %}
     {%- endif %}
     <title>{{ title|striptags }}{{ titlesuffix }}</title>
     {%- if builder == 'web' %}
     <link rel="stylesheet" href="{{ pathto('index') }}?do=stylesheet{%
-      if in_admin_panel %}&admin=yes{% endif %}" type="text/css">
+      if in_admin_panel %}&admin=yes{% endif %}" type="text/css" />
     {%- for link, type, title in page_links %}
-    <link rel="alternate" type="{{ type|e(true) }}" title="{{ title|e(true) }}" href="{{ link|e(true) }}">
+    <link rel="alternate" type="{{ type|e(true) }}" title="{{ title|e(true) }}" href="{{ link|e(true) }}" />
     {%- endfor %}
     {%- else %}
-    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css">
-    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css">
+    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
+    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
     {%- endif %}
     {%- if builder != 'htmlhelp' %}
     <script type="text/javascript">
     {%- endif %}
 {%- block rellinks %}
     {%- if hasdoc('about') %}
-    <link rel="author" title="About these documents" href="{{ pathto('about') }}">
+    <link rel="author" title="About these documents" href="{{ pathto('about') }}" />
     {%- endif %}
-    <link rel="contents" title="Global table of contents" href="{{ pathto('contents') }}">
-    <link rel="index" title="Global index" href="{{ pathto('genindex') }}">
-    <link rel="search" title="Search" href="{{ pathto('search') }}">
+    <link rel="contents" title="Global table of contents" href="{{ pathto('contents') }}" />
+    <link rel="index" title="Global index" href="{{ pathto('genindex') }}" />
+    <link rel="search" title="Search" href="{{ pathto('search') }}" />
     {%- if hasdoc('copyright') %}
-    <link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}">
+    <link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}" />
     {%- endif %}
-    <link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}">
+    <link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}" />
     {%- if parents %}
-    <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}">
+    <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
     {%- endif %}
     {%- if next %}
-    <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}">
+    <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
     {%- endif %}
     {%- if prev %}
-    <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}">
+    <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
     {%- endif %}
 {%- endblock %}
 {%- block extrahead %}{% endblock %}

File sphinx/templates/macros.html

           {% if current_page_name != "search" %}
             <h3>{{ builder == 'web' and 'Keyword' or 'Quick' }} search</h3>
             <form class="search" action="{{ pathto('search') }}" method="get">
-              <input type="text" name="q" size="18"> <input type="submit" value="Go">
-              <input type="hidden" name="check_keywords" value="yes">
-              <input type="hidden" name="area" value="default">
+              <input type="text" name="q" size="18"> <input type="submit" value="Go" />
+              <input type="hidden" name="check_keywords" value="yes" />
+              <input type="hidden" name="area" value="default" />
             </form>
             {% if builder == 'web' %}
             <p style="font-size: 90%">Enter a module, class or function name.</p>

File sphinx/templates/modindex.html

    <tr{% if indent %} class="cg-{{ cgroup }}"{% endif %}>
      <td>{% if collapse -%}
        <img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ cgroup }}"
-            class="toggler" style="display: none">
+            class="toggler" style="display: none" />
          {%- endif %}</td>
      <td>{% if indent %}&nbsp;&nbsp;&nbsp;{% endif %}
      {% if fname %}<a href="{{ fname }}">{% endif -%}

File sphinx/templates/search.html

     containing less words won't appear in the result list.
   </p>
   <form action="" method="get">
-    <input type="text" name="q" value="">
-    <input type="submit" value="search">
+    <input type="text" name="q" value="" />
+    <input type="submit" value="search" />
   </form>
   {% if search_performed %}
     <h2>Search Results</h2>