merge r46437 and r46946 from davisagli-features: respect the per-comment mime_type setting, and use the old cooked text/html from legacy comments when migrating

svn path=/plone.app.discussion/trunk/; revision=48356
This commit is contained in:
David Glick
2011-04-02 19:51:37 +00:00
parent bf5946367a
commit eb004aab44
11 changed files with 79 additions and 47 deletions
+3 -3
View File
@@ -77,14 +77,14 @@ def creator(object):
@indexer(IComment)
def description(object):
# Return the first 25 words of the comment text and append ' [...]'
text = join(object.text.split()[:MAX_DESCRIPTION])
if len(object.text.split()) > 25:
text = join(object.getText(targetMimetype='text/plain').split()[:MAX_DESCRIPTION])
if len(object.getText().split()) > 25:
text += " [...]"
return text
@indexer(IComment)
def searchable_text(object):
return object.text
return object.getText(targetMimetype='text/plain')
@indexer(IComment)
def in_response_to(object):