Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Fixed #2283 (again) - comment form templates don't validate a…

…s XHTML

Thanks to hjoreteg/thejaswi_puthraya for the report and patch.

Backport of [13855] from trunk

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit efae9a166bc273253990ce34963d4fa715f3077d 1 parent 2d7a3e7
Luke Plant authored September 14, 2010
4  django/contrib/comments/templates/comments/400-debug.html
... ...
@@ -1,5 +1,5 @@
1  
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2  
-<html lang="en">
  1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3 3
 <head>
4 4
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5 5
   <title>Comment post not allowed (400)</title>
2  django/contrib/comments/templates/comments/approve.html
@@ -7,7 +7,7 @@
7 7
   <h1>{% trans "Really make this comment public?" %}</h1>
8 8
   <blockquote>{{ comment|linebreaks }}</blockquote>
9 9
   <form action="." method="post">{% csrf_token %}
10  
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
  10
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
11 11
     <p class="submit">
12 12
       <input type="submit" name="submit" value="{% trans "Approve" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
13 13
     </p>
5  django/contrib/comments/templates/comments/base.html
... ...
@@ -1,5 +1,6 @@
1  
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2  
-<html lang="en">
  1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2
+.dtd">
  3
+<html xmlns="http://www.w3.org/1999/xhtml">
3 4
 <head>
4 5
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 6
   <title>{% block title %}{% endblock %}</title>
2  django/contrib/comments/templates/comments/delete.html
@@ -7,7 +7,7 @@
7 7
 <h1>{% trans "Really remove this comment?" %}</h1>
8 8
   <blockquote>{{ comment|linebreaks }}</blockquote>
9 9
   <form action="." method="post">{% csrf_token %}
10  
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
  10
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
11 11
     <p class="submit">
12 12
     <input type="submit" name="submit" value="{% trans "Remove" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
13 13
     </p>
2  django/contrib/comments/templates/comments/flag.html
@@ -7,7 +7,7 @@
7 7
 <h1>{% trans "Really flag this comment?" %}</h1>
8 8
   <blockquote>{{ comment|linebreaks }}</blockquote>
9 9
   <form action="." method="post">{% csrf_token %}
10  
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
  10
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
11 11
     <p class="submit">
12 12
     <input type="submit" name="submit" value="{% trans "Flag" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
13 13
     </p>
4  django/contrib/comments/templates/comments/form.html
... ...
@@ -1,9 +1,9 @@
1 1
 {% load comments i18n %}
2 2
 <form action="{% comment_form_target %}" method="post">{% csrf_token %}
3  
-  {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
  3
+  {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
4 4
   {% for field in form %}
5 5
     {% if field.is_hidden %}
6  
-      {{ field }}
  6
+      <div>{{ field }}</div>
7 7
     {% else %}
8 8
       {% if field.errors %}{{ field.errors }}{% endif %}
9 9
       <p
4  django/contrib/comments/templates/comments/preview.html
@@ -6,7 +6,7 @@
6 6
 {% block content %}
7 7
   {% load comments %}
8 8
   <form action="{% comment_form_target %}" method="post">{% csrf_token %}
9  
-    {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
  9
+    {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
10 10
     {% if form.errors %}
11 11
     <h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
12 12
     {% else %}
@@ -18,7 +18,7 @@
18 18
     {% endif %}
19 19
     {% for field in form %}
20 20
       {% if field.is_hidden %}
21  
-        {{ field }}
  21
+        <div>{{ field }}</div>
22 22
       {% else %}
23 23
         {% if field.errors %}{{ field.errors }}{% endif %}
24 24
         <p

0 notes on commit efae9a1

Please sign in to comment.
Something went wrong with that request. Please try again.