Commit 2ba4278c authored by Luke Plant's avatar Luke Plant
Browse files

Fixed #18484 - 'display:none' on CSRF token div is redundant and causes problems with some browsers

Thanks to hedleyroos for the report
parent 4c417cc9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ class CsrfTokenNode(Node):
            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