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:
parent
dbda349768
commit
1a6b1fdb91
@ -8,6 +8,10 @@ Changelog
|
|||||||
fixes http://dev.plone.org/plone/ticket/11298.
|
fixes http://dev.plone.org/plone/ticket/11298.
|
||||||
[timo]
|
[timo]
|
||||||
|
|
||||||
|
- Use Plone's safe_encode method instead of encode() to make sure unicode
|
||||||
|
encoded strings can be indexed too.
|
||||||
|
[timo]
|
||||||
|
|
||||||
|
|
||||||
2.0.7 (2011-07-15)
|
2.0.7 (2011-07-15)
|
||||||
------------------
|
------------------
|
||||||
|
@ -10,6 +10,8 @@ from DateTime import DateTime
|
|||||||
|
|
||||||
from Products.CMFCore.interfaces import IContentish
|
from Products.CMFCore.interfaces import IContentish
|
||||||
|
|
||||||
|
from Products.CMFPlone.utils import safe_unicode
|
||||||
|
|
||||||
from Products.ZCatalog.interfaces import IZCatalog
|
from Products.ZCatalog.interfaces import IZCatalog
|
||||||
|
|
||||||
from plone.app.discussion.interfaces import IConversation, IComment
|
from plone.app.discussion.interfaces import IConversation, IComment
|
||||||
@ -70,7 +72,7 @@ def title(object):
|
|||||||
|
|
||||||
@indexer(IComment)
|
@indexer(IComment)
|
||||||
def creator(object):
|
def creator(object):
|
||||||
return object.creator and object.creator.encode('utf-8')
|
return object.creator and safe_unicode(object.creator)
|
||||||
|
|
||||||
@indexer(IComment)
|
@indexer(IComment)
|
||||||
def description(object):
|
def description(object):
|
||||||
|
Loading…
Reference in New Issue
Block a user