Commit 70057684 authored by Andreas Jung's avatar Andreas Jung

- Collector #2269: fixed broken FTP support for ZPT

parent 2b2d7822
......@@ -12,6 +12,8 @@ Zope Changes
- Collector #2261: Acquisition when creating objects via Webdav.
- Collector #2269: fixed broken FTP support for ZPT
Zope 2.10.2 beta 1 (2007/01/14)
Bugs fixed
......
......@@ -359,7 +359,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
security.declareProtected(ftp_access, 'manage_FTPget')
def manage_FTPget(self):
"Get source for FTP download"
result = self.pt_render()
result = self.read()
return result.encode(self.output_encoding)
security.declareProtected(view_management_screens, 'html')
......
......@@ -249,6 +249,14 @@ class ZPTRegressions(unittest.TestCase):
pt = self.app.pt1
self.assertEqual(pt.document_src(), self.text)
def testFTPGet(self):
# check for bug #2269
request = self.app.REQUEST
text = '<span tal:content="string:foobar"></span>'
self._addPT('pt1', text=text, REQUEST=request)
result = self.app.pt1.manage_FTPget()
self.assertEqual(result, text)
class ZPTMacros(zope.component.testing.PlacelessSetup, unittest.TestCase):
......
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