Use safe_unicode to decode the title of the content. encode("utf-9") caused Dexterity based content types to raise a unicode decode error. This fixes http://dev.plone.org/plone/ticket/11292. Refs #11292
svn path=/plone.app.discussion/trunk/; revision=45915
This commit is contained in:
parent
3c219397fa
commit
7dbcc9e2be
@ -4,6 +4,11 @@ Changelog
|
||||
1.0RC1 (unreleased)
|
||||
-------------------
|
||||
|
||||
- Use safe_unicode to decode the title of the content. encode("utf-9") caused
|
||||
Dexterity based content types to raise a unicode decode error. This fixes
|
||||
http://dev.plone.org/plone/ticket/11292
|
||||
[dukebody]
|
||||
|
||||
- Spanish translation updated.
|
||||
[dukebody]
|
||||
|
||||
@ -19,6 +24,7 @@ Changelog
|
||||
- Updated italian translation.
|
||||
[keul]
|
||||
|
||||
|
||||
1.0b12 (2010-11-04)
|
||||
-------------------
|
||||
|
||||
|
@ -27,6 +27,8 @@ from persistent import Persistent
|
||||
from Products.CMFCore.DynamicType import DynamicType
|
||||
from Products.CMFCore.utils import getToolByName
|
||||
|
||||
from Products.CMFPlone.utils import safe_unicode
|
||||
|
||||
from OFS.Traversable import Traversable
|
||||
|
||||
from plone.registry.interfaces import IRegistry
|
||||
@ -137,7 +139,7 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
|
||||
title = translate(
|
||||
Message(COMMENT_TITLE,
|
||||
mapping={'creator': creator,
|
||||
'content': content.Title().decode("utf-8")}))
|
||||
'content': safe_unicode(content.Title())}))
|
||||
return title
|
||||
|
||||
def Creator(self):
|
||||
|
Loading…
Reference in New Issue
Block a user