From 0048b02d992409f449967bd041c483978e84641f Mon Sep 17 00:00:00 2001 From: helmutm Date: Mon, 29 Jun 2009 09:32:05 +0000 Subject: [PATCH] always provide unicode for rendering git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3434 fd906abe-77d9-0310-91a1-e0d9ade77398 --- browser/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/browser/common.py b/browser/common.py index 8d24514..cbf456b 100644 --- a/browser/common.py +++ b/browser/common.py @@ -340,11 +340,12 @@ class BaseView(GenericView, I18NView): yield view def renderText(self, text, contentType): + text = util.toUnicode(text) typeKey = util.renderingFactories.get(contentType, None) if typeKey is None: if contentType == u'text/html': - return util.toUnicode(text) - return u'
%s
' % util.html_quote(util.toUnicode(text)) + return text + return u'
%s
' % util.html_quote(text) source = component.createObject(typeKey, text) view = component.getMultiAdapter((removeAllProxies(source), self.request)) return view.render()