Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3157 -- Made error message XHTML-friendly in CSRF middleware. …

…Thanks, mir@noris.de

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d9ce900e13077d47f8ca43064e904a38f7f1787e 1 parent 8103b7d
Adrian Holovaty authored December 18, 2006

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/contrib/csrf/middleware.py
2  django/contrib/csrf/middleware.py
@@ -11,7 +11,7 @@
11 11
 import re
12 12
 import itertools
13 13
 
14  
-_ERROR_MSG = "<h1>403 Forbidden</h1><p>Cross Site Request Forgery detected.  Request aborted.</p>"
  14
+_ERROR_MSG = '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><body><h1>403 Forbidden</h1><p>Cross Site Request Forgery detected. Request aborted.</p></body></html>'
15 15
 
16 16
 _POST_FORM_RE = \
17 17
     re.compile(r'(<form\W[^>]*\bmethod=(\'|"|)POST(\'|"|)\b[^>]*>)', re.IGNORECASE)

0 notes on commit d9ce900

Please sign in to comment.
Something went wrong with that request. Please try again.