Skip to content

Commit 1cfa8f2

Browse files
committed
Fixes #182 - Replaced display none by hidden attribute.
This change improves CSP compliancy. Thanks Martin Lueders for the report and patch.
1 parent 82c7002 commit 1cfa8f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

django_comments/templates/comments/form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% if field.errors %}{{ field.errors }}{% endif %}
1010
<p
1111
{% if field.errors %} class="error"{% endif %}
12-
{% if field.name == "honeypot" %} style="display:none;"{% endif %}>
12+
{% if field.name == "honeypot" %}hidden{% endif %}>
1313
{{ field.label_tag }} {{ field }}
1414
</p>
1515
{% endif %}

django_comments/templates/comments/preview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h1>{% trans "Preview your comment" %}</h1>
2727
{% if field.errors %}{{ field.errors }}{% endif %}
2828
<p
2929
{% if field.errors %} class="error"{% endif %}
30-
{% if field.name == "honeypot" %} style="display:none;"{% endif %}>
30+
{% if field.name == "honeypot" %}hidden{% endif %}>
3131
{{ field.label_tag }} {{ field }}
3232
</p>
3333
{% endif %}

0 commit comments

Comments
 (0)