Use Plone's safe_encode method instead of encode() to make sure unicode encoded strings can be indexed too.

svn path=/plone.app.discussion/trunk/; revision=51432
This commit is contained in:
Timo Stollenwerk
2011-07-25 06:47:45 +00:00
parent dbda349768
commit 1a6b1fdb91
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -10,6 +10,8 @@ from DateTime import DateTime
from Products.CMFCore.interfaces import IContentish
from Products.CMFPlone.utils import safe_unicode
from Products.ZCatalog.interfaces import IZCatalog
from plone.app.discussion.interfaces import IConversation, IComment
@@ -70,7 +72,7 @@ def title(object):
@indexer(IComment)
def creator(object):
return object.creator and object.creator.encode('utf-8')
return object.creator and safe_unicode(object.creator)
@indexer(IComment)
def description(object):