Commit 13ff3f46 authored by Andreas Jung's avatar Andreas Jung

- Launchpad #262313: respect the 'Expand macros when editing' flag

  when editing a page template through the ZMI
parent 7802a711
...@@ -207,6 +207,9 @@ Zope Changes ...@@ -207,6 +207,9 @@ Zope Changes
Bugs Fixed Bugs Fixed
- Launchpad #262313: respect the 'Expand macros when editing' flag
when editing a page template through the ZMI
- Launchpad #257276: fix for possible denial-of-service attack - Launchpad #257276: fix for possible denial-of-service attack
in PythonScript when passing an arbitrary module to the encode() in PythonScript when passing an arbitrary module to the encode()
or decode() of strings. or decode() of strings.
......
...@@ -74,6 +74,8 @@ class PageTemplate(ExtensionClass.Base, ...@@ -74,6 +74,8 @@ class PageTemplate(ExtensionClass.Base,
sourceAnnotations = getattr(debug, 'sourceAnnotations', False) sourceAnnotations = getattr(debug, 'sourceAnnotations', False)
else: else:
showtal = sourceAnnotations = False showtal = sourceAnnotations = False
if source:
showtal = True
return super(PageTemplate, self).pt_render(c, source=source, sourceAnnotations=sourceAnnotations, return super(PageTemplate, self).pt_render(c, source=source, sourceAnnotations=sourceAnnotations,
showtal=showtal) showtal=showtal)
......
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