Commit c2761214 authored by Andreas Jung's avatar Andreas Jung

write() only accepts unicode

parent de9449cd
......@@ -278,6 +278,8 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
return c
def write(self, text):
if not isinstance(text, unicode):
raise TypeError("'text' parameter must be unicode")
self.ZCacheable_invalidate()
ZopePageTemplate.inheritedAttribute('write')(self, text)
......
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