Take care of properly converting titles to unicode

svn path=/plone.app.discussion/trunk/; revision=47991
This commit is contained in:
Patrick Gerken 2011-03-08 20:15:52 +00:00
parent 774ed36746
commit 79701cce7e

View File

@ -225,7 +225,7 @@ def notify_user(obj, event):
context=obj.REQUEST) context=obj.REQUEST)
message = translate(Message( message = translate(Message(
MAIL_NOTIFICATION_MESSAGE, MAIL_NOTIFICATION_MESSAGE,
mapping={'title': content_object.title, mapping={'title': safe_unicode(content_object.title),
'link': content_object.absolute_url()}), 'link': content_object.absolute_url()}),
context=obj.REQUEST) context=obj.REQUEST)
for email in emails: for email in emails:
@ -279,7 +279,7 @@ def notify_moderator(obj, event):
#comment = conversation.getComments().next() #comment = conversation.getComments().next()
subject = translate(_(u"A comment has been posted."), context=obj.REQUEST) subject = translate(_(u"A comment has been posted."), context=obj.REQUEST)
message = translate(Message(MAIL_NOTIFICATION_MESSAGE, message = translate(Message(MAIL_NOTIFICATION_MESSAGE,
mapping={'title': content_object.title, mapping={'title': safe_unicode(content_object.title),
'link': content_object.absolute_url()}), 'link': content_object.absolute_url()}),
context=obj.REQUEST) context=obj.REQUEST)