Use the Zope2 TALES engine to support Zope2-compatible TALES traversal.

If that is going to go away, then this will have to be done differently,
but at least this fixes several issues where the z3-style PageTemplate
implementation didn't do everything that the Zope 2 one did.
parent 98723022
......@@ -38,6 +38,8 @@ from webdav.WriteLockInterface import WriteLockInterface
from zope.pagetemplate.pagetemplate import PageTemplate
from zope.pagetemplate.pagetemplatefile import sniff_type
from Products.PageTemplates.Expressions import getEngine
# regular expression to extract the encoding from the XML preamble
encoding_reg= re.compile('<\?xml.*?encoding="(.*?)".*?\?>', re.M)
......@@ -132,6 +134,9 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
self.ZBindings_edit(self._default_bindings)
self.pt_edit(text, content_type, encoding)
def pt_getEngine(self):
return getEngine()
security.declareProtected(change_page_templates, 'pt_edit')
def pt_edit(self, text, content_type, encoding='utf-8'):
......
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