Make 'text/plain' the default mime type for comments and make sure the default type is set properly when creating a new comment.

This commit is contained in:
Timo Stollenwerk
2012-06-17 12:09:25 +02:00
parent f45373b311
commit 702f7e1f1d
3 changed files with 13 additions and 1 deletions
+4
View File
@@ -168,6 +168,10 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
# Create comment
comment = createObject('plone.Comment')
# Set comment mime type to current setting in the discussion registry
comment.mime_type = settings.text_transform
# Set comment attributes (including extended comment form attributes)
for attribute in self.fields.keys():
setattr(comment, attribute, data[attribute])