Kaydet (Commit) c26553c4 authored tarafından Luke Plant's avatar Luke Plant

Fixed #1827 - added 'id' attribute to generated CSRF hidden field. Good call, Ian Holsman.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst c4274795
......@@ -78,7 +78,7 @@ class CsrfMiddleware(object):
# 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment