diff --git a/django/contrib/csrf/middleware.py b/django/contrib/csrf/middleware.py --- a/django/contrib/csrf/middleware.py +++ b/django/contrib/csrf/middleware.py @@ -11,7 +11,7 @@ import md5 import re import itertools -_ERROR_MSG = "

403 Forbidden

Cross Site Request Forgery detected. Request aborted.

" +_ERROR_MSG = '

403 Forbidden

Cross Site Request Forgery detected. Request aborted.

' _POST_FORM_RE = \ re.compile(r'(]*\bmethod=(\'|"|)POST(\'|"|)\b[^>]*>)', re.IGNORECASE)