Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #18484 - 'display:none' on CSRF token div is redundant and caus…

…es problems with some browsers

Thanks to hedleyroos for the report
  • Loading branch information...
commit 2ba4278cb38f1346d70cf427bbeac71a4d1dc5ad 1 parent 4c417cc
@spookylukey spookylukey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/template/defaulttags.py
View
2  django/template/defaulttags.py
@@ -47,7 +47,7 @@ def render(self, context):
if csrf_token == 'NOTPROVIDED':
return format_html("")
else:
- return format_html("<div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='{0}' /></div>", csrf_token)
+ return format_html("<div><input type='hidden' name='csrfmiddlewaretoken' value='{0}' /></div>", csrf_token)
else:
# It's very probable that the token is missing because of
# misconfiguration, so we raise a warning
Please sign in to comment.
Something went wrong with that request. Please try again.