summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-09-14 14:22:35 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-09-14 14:22:35 +0000
commit34a4af50be5c8a9ddf147b8c1315f8f227590e1e (patch)
tree9b6abe33cb62bf6133dd5781cc73a433e92d8f56
parent3c19671711a6ba54258feafb604446bcd64e6154 (diff)
Fixed #2283 (again) - comment form templates don't validate as XHTML
Thanks to hjoreteg/thejaswi_puthraya for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/comments/templates/comments/400-debug.html4
-rw-r--r--django/contrib/comments/templates/comments/approve.html2
-rw-r--r--django/contrib/comments/templates/comments/base.html5
-rw-r--r--django/contrib/comments/templates/comments/delete.html2
-rw-r--r--django/contrib/comments/templates/comments/flag.html2
-rw-r--r--django/contrib/comments/templates/comments/form.html4
-rw-r--r--django/contrib/comments/templates/comments/preview.html4
7 files changed, 12 insertions, 11 deletions
diff --git a/django/contrib/comments/templates/comments/400-debug.html b/django/contrib/comments/templates/comments/400-debug.html
index 3c4532b9b0..29593b574b 100644
--- a/django/contrib/comments/templates/comments/400-debug.html
+++ b/django/contrib/comments/templates/comments/400-debug.html
@@ -1,5 +1,5 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Comment post not allowed (400)</title>
diff --git a/django/contrib/comments/templates/comments/approve.html b/django/contrib/comments/templates/comments/approve.html
index 1a3a3fd80c..78d15dbb0e 100644
--- a/django/contrib/comments/templates/comments/approve.html
+++ b/django/contrib/comments/templates/comments/approve.html
@@ -7,7 +7,7 @@
<h1>{% trans "Really make this comment public?" %}</h1>
<blockquote>{{ comment|linebreaks }}</blockquote>
<form action="." method="post">{% csrf_token %}
- {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
+ {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
<p class="submit">
<input type="submit" name="submit" value="{% trans "Approve" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
</p>
diff --git a/django/contrib/comments/templates/comments/base.html b/django/contrib/comments/templates/comments/base.html
index 36fc66f7d1..b787246c9c 100644
--- a/django/contrib/comments/templates/comments/base.html
+++ b/django/contrib/comments/templates/comments/base.html
@@ -1,5 +1,6 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{% block title %}{% endblock %}</title>
diff --git a/django/contrib/comments/templates/comments/delete.html b/django/contrib/comments/templates/comments/delete.html
index 5ff2add9c5..50c9a4d1b1 100644
--- a/django/contrib/comments/templates/comments/delete.html
+++ b/django/contrib/comments/templates/comments/delete.html
@@ -7,7 +7,7 @@
<h1>{% trans "Really remove this comment?" %}</h1>
<blockquote>{{ comment|linebreaks }}</blockquote>
<form action="." method="post">{% csrf_token %}
- {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
+ {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
<p class="submit">
<input type="submit" name="submit" value="{% trans "Remove" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
</p>
diff --git a/django/contrib/comments/templates/comments/flag.html b/django/contrib/comments/templates/comments/flag.html
index 0b9ab1ccb2..ca7c77f111 100644
--- a/django/contrib/comments/templates/comments/flag.html
+++ b/django/contrib/comments/templates/comments/flag.html
@@ -7,7 +7,7 @@
<h1>{% trans "Really flag this comment?" %}</h1>
<blockquote>{{ comment|linebreaks }}</blockquote>
<form action="." method="post">{% csrf_token %}
- {% if next %}<input type="hidden" name="next" value="{{ next }}" id="next" />{% endif %}
+ {% if next %}<div><input type="hidden" name="next" value="{{ next }}" id="next" /></div>{% endif %}
<p class="submit">
<input type="submit" name="submit" value="{% trans "Flag" %}" /> or <a href="{{ comment.get_absolute_url }}">cancel</a>
</p>
diff --git a/django/contrib/comments/templates/comments/form.html b/django/contrib/comments/templates/comments/form.html
index 30f031128c..2a9ad557dd 100644
--- a/django/contrib/comments/templates/comments/form.html
+++ b/django/contrib/comments/templates/comments/form.html
@@ -1,9 +1,9 @@
{% load comments i18n %}
<form action="{% comment_form_target %}" method="post">{% csrf_token %}
- {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
+ {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
{% for field in form %}
{% if field.is_hidden %}
- {{ field }}
+ <div>{{ field }}</div>
{% else %}
{% if field.errors %}{{ field.errors }}{% endif %}
<p
diff --git a/django/contrib/comments/templates/comments/preview.html b/django/contrib/comments/templates/comments/preview.html
index 1b072a76f0..b1607b90c2 100644
--- a/django/contrib/comments/templates/comments/preview.html
+++ b/django/contrib/comments/templates/comments/preview.html
@@ -6,7 +6,7 @@
{% block content %}
{% load comments %}
<form action="{% comment_form_target %}" method="post">{% csrf_token %}
- {% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
+ {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
{% if form.errors %}
<h1>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
{% else %}
@@ -18,7 +18,7 @@
{% endif %}
{% for field in form %}
{% if field.is_hidden %}
- {{ field }}
+ <div>{{ field }}</div>
{% else %}
{% if field.errors %}{{ field.errors }}{% endif %}
<p