Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #102 -- Now using text/plain mimetype for exceptions displayed …

…in the browser, so angle brackets are no longer an issue

git-svn-id: http://code.djangoproject.com/svn/django/trunk@241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e215ed36092807a558fcfa29492d7246ce6158ed 1 parent 2012f7d
@adrianholovaty adrianholovaty authored
View
4 django/core/handlers/modpython.py
@@ -258,9 +258,9 @@ def get_technical_error_response(self, is404=False):
Returns an HttpResponse that displays a TECHNICAL error message for a
fundamental database or coding error.
"""
- error_string = "<pre>There's been an error:\n\n%s</pre>" % self._get_traceback()
+ error_string = "There's been an error:\n\n%s" % self._get_traceback()
responseClass = is404 and httpwrappers.HttpResponseNotFound or httpwrappers.HttpResponseServerError
- return responseClass(error_string)
+ return responseClass(error_string, mimetype='text/plain')
def _get_traceback(self):
"Helper function to return the traceback as a string"
View
4 django/core/handlers/wsgi.py
@@ -232,9 +232,9 @@ def get_technical_error_response(self, is404=False):
Returns an HttpResponse that displays a TECHNICAL error message for a
fundamental database or coding error.
"""
- error_string = "<pre>There's been an error:\n\n%s</pre>" % self._get_traceback()
+ error_string = "There's been an error:\n\n%s" % self._get_traceback()
responseClass = is404 and httpwrappers.HttpResponseNotFound or httpwrappers.HttpResponseServerError
- return responseClass(error_string)
+ return responseClass(error_string, mimetype='text/plain')
def _get_traceback(self):
"Helper function to return the traceback as a string"
Please sign in to comment.
Something went wrong with that request. Please try again.