summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorDavid <smithdc@gmail.com>2022-01-07 07:46:55 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-01-07 16:12:15 +0100
commitc959aa99aa365c123a3b5ca72df9d07e0e3fe6e5 (patch)
tree8393d09f5c4f9856259ee16e03ca7b8048e22b23 /django
parent11475958f6c1aca61638c476cc314ec0410161dc (diff)
[4.0.x] Fixed #33419 -- Restored marking forms.Field.help_text as HTML safe.
Regression in 456466d932830b096d39806e291fe23ec5ed38d5. Thanks Matt Westcott for the report. Backport of 4c60c3edff4312303e1021fca47ed52c2152d285 from main
Diffstat (limited to 'django')
-rw-r--r--django/forms/jinja2/django/forms/p.html2
-rw-r--r--django/forms/jinja2/django/forms/table.html2
-rw-r--r--django/forms/jinja2/django/forms/ul.html2
-rw-r--r--django/forms/templates/django/forms/p.html2
-rw-r--r--django/forms/templates/django/forms/table.html2
-rw-r--r--django/forms/templates/django/forms/ul.html2
6 files changed, 6 insertions, 6 deletions
diff --git a/django/forms/jinja2/django/forms/p.html b/django/forms/jinja2/django/forms/p.html
index 999c4d963a..a2872d993e 100644
--- a/django/forms/jinja2/django/forms/p.html
+++ b/django/forms/jinja2/django/forms/p.html
@@ -8,7 +8,7 @@
{% if field.label %}{{ field.label_tag() }}{% endif %}
{{ field }}
{% if field.help_text %}
- <span class="helptext">{{ field.help_text }}</span>
+ <span class="helptext">{{ field.help_text|safe }}</span>
{% endif %}
{% if loop.last %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
diff --git a/django/forms/jinja2/django/forms/table.html b/django/forms/jinja2/django/forms/table.html
index 92cd746a49..d1d51f2b12 100644
--- a/django/forms/jinja2/django/forms/table.html
+++ b/django/forms/jinja2/django/forms/table.html
@@ -16,7 +16,7 @@
{{ field }}
{% if field.help_text %}
<br>
- <span class="helptext">{{ field.help_text }}</span>
+ <span class="helptext">{{ field.help_text|safe }}</span>
{% endif %}
{% if loop.last %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
diff --git a/django/forms/jinja2/django/forms/ul.html b/django/forms/jinja2/django/forms/ul.html
index 116a9b0808..cc4d893c0e 100644
--- a/django/forms/jinja2/django/forms/ul.html
+++ b/django/forms/jinja2/django/forms/ul.html
@@ -12,7 +12,7 @@
{% if field.label %}{{ field.label_tag() }}{% endif %}
{{ field }}
{% if field.help_text %}
- <span class="helptext">{{ field.help_text }}</span>
+ <span class="helptext">{{ field.help_text|safe }}</span>
{% endif %}
{% if loop.last %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
diff --git a/django/forms/templates/django/forms/p.html b/django/forms/templates/django/forms/p.html
index 1835b7a461..1346937a34 100644
--- a/django/forms/templates/django/forms/p.html
+++ b/django/forms/templates/django/forms/p.html
@@ -8,7 +8,7 @@
{% if field.label %}{{ field.label_tag }}{% endif %}
{{ field }}
{% if field.help_text %}
- <span class="helptext">{{ field.help_text }}</span>
+ <span class="helptext">{{ field.help_text|safe }}</span>
{% endif %}
{% if forloop.last %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
diff --git a/django/forms/templates/django/forms/table.html b/django/forms/templates/django/forms/table.html
index a553776f2f..d4aaafcf53 100644
--- a/django/forms/templates/django/forms/table.html
+++ b/django/forms/templates/django/forms/table.html
@@ -16,7 +16,7 @@
{{ field }}
{% if field.help_text %}
<br>
- <span class="helptext">{{ field.help_text }}</span>
+ <span class="helptext">{{ field.help_text|safe }}</span>
{% endif %}
{% if forloop.last %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
diff --git a/django/forms/templates/django/forms/ul.html b/django/forms/templates/django/forms/ul.html
index 9ce6a49f07..ae38af6527 100644
--- a/django/forms/templates/django/forms/ul.html
+++ b/django/forms/templates/django/forms/ul.html
@@ -12,7 +12,7 @@
{% if field.label %}{{ field.label_tag }}{% endif %}
{{ field }}
{% if field.help_text %}
- <span class="helptext">{{ field.help_text }}</span>
+ <span class="helptext">{{ field.help_text|safe }}</span>
{% endif %}
{% if forloop.last %}
{% for field in hidden_fields %}{{ field }}{% endfor %}