Commit 59155ce2 authored by Evan Simpson's avatar Evan Simpson

document_src is now text/plain

parent 524c639e
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
Zope object encapsulating a Page Template. Zope object encapsulating a Page Template.
""" """
__version__='$Revision: 1.26 $'[11:-2] __version__='$Revision: 1.27 $'[11:-2]
import os, AccessControl, Acquisition, sys import os, AccessControl, Acquisition, sys
from Globals import DTMLFile, ImageFile, MessageDialog, package_home from Globals import DTMLFile, ImageFile, MessageDialog, package_home
...@@ -275,7 +275,8 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, ...@@ -275,7 +275,8 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
result = self.pt_render(extra_context=bound_names) result = self.pt_render(extra_context=bound_names)
except TALESError, err: except TALESError, err:
if (err.type == Unauthorized or if (err.type == Unauthorized or
isinstance(err.type, Unauthorized)): (isinstance(Unauthorized, Exception) and
isinstance(err.type, Unauthorized))):
raise err.type, err.value, err.takeTraceback() raise err.type, err.value, err.takeTraceback()
err.takeTraceback() err.takeTraceback()
raise raise
...@@ -319,7 +320,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, ...@@ -319,7 +320,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
"""Return expanded document source.""" """Return expanded document source."""
if RESPONSE is not None: if RESPONSE is not None:
RESPONSE.setHeader('Content-Type', self.content_type) RESPONSE.setHeader('Content-Type', 'text/plain')
if REQUEST.get('raw'): if REQUEST.get('raw'):
return self._text return self._text
return self.read() return self.read()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment