diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-07-20 06:13:06 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-07-20 06:13:06 +0000 |
| commit | e215ed36092807a558fcfa29492d7246ce6158ed (patch) | |
| tree | c7a3de3e03492ab2800091b3cf5384b0b773769f | |
| parent | 2012f7df63a6c087792b7afa7e9cb1d26731005e (diff) | |
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
| -rw-r--r-- | django/core/handlers/modpython.py | 4 | ||||
| -rw-r--r-- | 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 = "<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" 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 = "<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" |
