Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored July 20, 2005
4  django/core/handlers/modpython.py
@@ -258,9 +258,9 @@ def get_technical_error_response(self, is404=False):
258 258
         Returns an HttpResponse that displays a TECHNICAL error message for a
259 259
         fundamental database or coding error.
260 260
         """
261  
-        error_string = "<pre>There's been an error:\n\n%s</pre>" % self._get_traceback()
  261
+        error_string = "There's been an error:\n\n%s" % self._get_traceback()
262 262
         responseClass = is404 and httpwrappers.HttpResponseNotFound or httpwrappers.HttpResponseServerError
263  
-        return responseClass(error_string)
  263
+        return responseClass(error_string, mimetype='text/plain')
264 264
 
265 265
     def _get_traceback(self):
266 266
         "Helper function to return the traceback as a string"
4  django/core/handlers/wsgi.py
@@ -232,9 +232,9 @@ def get_technical_error_response(self, is404=False):
232 232
         Returns an HttpResponse that displays a TECHNICAL error message for a
233 233
         fundamental database or coding error.
234 234
         """
235  
-        error_string = "<pre>There's been an error:\n\n%s</pre>" % self._get_traceback()
  235
+        error_string = "There's been an error:\n\n%s" % self._get_traceback()
236 236
         responseClass = is404 and httpwrappers.HttpResponseNotFound or httpwrappers.HttpResponseServerError
237  
-        return responseClass(error_string)
  237
+        return responseClass(error_string, mimetype='text/plain')
238 238
 
239 239
     def _get_traceback(self):
240 240
         "Helper function to return the traceback as a string"

0 notes on commit e215ed3

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