Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #1827 - added 'id' attribute to generated CSRF hidden field. Go…

…od call, Ian Holsman.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c26553c4f91a2a0ac1ca8d173888c414fc9cecda 1 parent c427479
@spookylukey spookylukey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/csrf/middleware.py
View
2  django/contrib/csrf/middleware.py
@@ -78,7 +78,7 @@ def process_response(self, request, response):
# Modify any POST forms
extra_field = "<div style='display:none;'>" + \
- "<input type='hidden' name='csrfmiddlewaretoken' value='" + \
+ "<input type='hidden' id='csrfmiddlewaretoken' name='csrfmiddlewaretoken' value='" + \
csrf_token + "' /></div>"
response.content = _POST_FORM_RE.sub('\\1' + extra_field, response.content)
return response
Please sign in to comment.
Something went wrong with that request. Please try again.