summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-01-20 23:09:10 -0800
committerTim Graham <timograham@gmail.com>2018-01-21 02:09:10 -0500
commitff05de760cc4ef4c7f188e163c722ec3bc1f0cbf (patch)
treeba133d0ecea7521935c98cf1c058df4e6a9ff233 /django/forms
parent4b0f39d9fb2033a9597e30ac13af162440b82ebc (diff)
Fixed #29038 -- Removed closing slash from HTML void tags.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/forms.py2
-rw-r--r--django/forms/jinja2/django/forms/widgets/clearable_file_input.html6
-rw-r--r--django/forms/jinja2/django/forms/widgets/input.html2
-rw-r--r--django/forms/templates/django/forms/widgets/clearable_file_input.html6
-rw-r--r--django/forms/templates/django/forms/widgets/input.html2
-rw-r--r--django/forms/widgets.py2
6 files changed, 10 insertions, 10 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index 1be7814993..19d5778468 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -274,7 +274,7 @@ class BaseForm:
normal_row='<tr%(html_class_attr)s><th>%(label)s</th><td>%(errors)s%(field)s%(help_text)s</td></tr>',
error_row='<tr><td colspan="2">%s</td></tr>',
row_ender='</td></tr>',
- help_text_html='<br /><span class="helptext">%s</span>',
+ help_text_html='<br><span class="helptext">%s</span>',
errors_on_separate_row=False)
def as_ul(self):
diff --git a/django/forms/jinja2/django/forms/widgets/clearable_file_input.html b/django/forms/jinja2/django/forms/widgets/clearable_file_input.html
index 7248f32d2a..9e76435216 100644
--- a/django/forms/jinja2/django/forms/widgets/clearable_file_input.html
+++ b/django/forms/jinja2/django/forms/widgets/clearable_file_input.html
@@ -1,5 +1,5 @@
{% if widget.is_initial %}{{ widget.initial_text }}: <a href="{{ widget.value.url }}">{{ widget.value }}</a>{% if not widget.required %}
-<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}" />
-<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>{% endif %}<br />
+<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}">
+<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>{% endif %}<br>
{{ widget.input_text }}:{% endif %}
-<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %} />
+<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
diff --git a/django/forms/jinja2/django/forms/widgets/input.html b/django/forms/jinja2/django/forms/widgets/input.html
index abbdf6bd26..d5651571f2 100644
--- a/django/forms/jinja2/django/forms/widgets/input.html
+++ b/django/forms/jinja2/django/forms/widgets/input.html
@@ -1 +1 @@
-<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
+<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}>
diff --git a/django/forms/templates/django/forms/widgets/clearable_file_input.html b/django/forms/templates/django/forms/widgets/clearable_file_input.html
index 7248f32d2a..9e76435216 100644
--- a/django/forms/templates/django/forms/widgets/clearable_file_input.html
+++ b/django/forms/templates/django/forms/widgets/clearable_file_input.html
@@ -1,5 +1,5 @@
{% if widget.is_initial %}{{ widget.initial_text }}: <a href="{{ widget.value.url }}">{{ widget.value }}</a>{% if not widget.required %}
-<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}" />
-<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>{% endif %}<br />
+<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}">
+<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>{% endif %}<br>
{{ widget.input_text }}:{% endif %}
-<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %} />
+<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
diff --git a/django/forms/templates/django/forms/widgets/input.html b/django/forms/templates/django/forms/widgets/input.html
index 5feef43c55..9010a92145 100644
--- a/django/forms/templates/django/forms/widgets/input.html
+++ b/django/forms/templates/django/forms/widgets/input.html
@@ -1 +1 @@
-<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
+<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}>
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 6ccbb86274..76c12e2dcb 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -74,7 +74,7 @@ class Media:
media = sorted(self._css)
return chain.from_iterable([
format_html(
- '<link href="{}" type="text/css" media="{}" rel="stylesheet" />',
+ '<link href="{}" type="text/css" media="{}" rel="stylesheet">',
self.absolute_path(path), medium
) for path in self._css[medium]
] for medium in media)