From e215ed36092807a558fcfa29492d7246ce6158ed Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 20 Jul 2005 06:13:06 +0000 Subject: [PATCH] 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 --- django/core/handlers/modpython.py | 4 ++-- django/core/handlers/wsgi.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index 9d74eee59a..0ab186eb01 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -258,9 +258,9 @@ class ModPythonHandler: Returns an HttpResponse that displays a TECHNICAL error message for a fundamental database or coding error. """ - error_string = "
There's been an error:\n\n%s
" % 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" diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 9a4c719245..4e82a1be7a 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -232,9 +232,9 @@ class WSGIHandler: Returns an HttpResponse that displays a TECHNICAL error message for a fundamental database or coding error. """ - error_string = "
There's been an error:\n\n%s
" % 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"