diff --git a/isso/tests/test_comments.py b/isso/tests/test_comments.py index 4ba67c8..2ffe2ad 100644 --- a/isso/tests/test_comments.py +++ b/isso/tests/test_comments.py @@ -345,7 +345,7 @@ class TestComments(unittest.TestCase): self.post('/new?uri=%2Fpath%2F', data=json.dumps({'text': 'First'})) self.post('/new?uri=%2Fpath%2F', - data=json.dumps({'text': 'First', 'parent': 1})) + data=json.dumps({'text': '*Second*', 'parent': 1})) rv = self.get('/feed?uri=%2Fpath%2F') self.assertEqual(rv.status_code, 200) @@ -354,7 +354,7 @@ class TestComments(unittest.TestCase): data = re.sub('[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+Z', '2018-04-01T10:00:00Z', data) self.assertEqual(data, """ -2018-04-01T10:00:00Ztag:example.org,2018:/isso/thread/path/Comments for example.org/path/tag:example.org,2018:/isso/1/2Comment #22018-04-01T10:00:00ZFirsttag:example.org,2018:/isso/1/1Comment #12018-04-01T10:00:00ZFirst""") +2018-04-01T10:00:00Ztag:example.org,2018:/isso/thread/path/Comments for example.org/path/tag:example.org,2018:/isso/1/2Comment #22018-04-01T10:00:00Z<p><em>Second</em></p>tag:example.org,2018:/isso/1/1Comment #12018-04-01T10:00:00Z<p>First</p>""") def testCounts(self): diff --git a/isso/views/comments.py b/isso/views/comments.py index 87cf48d..2e8b4f3 100644 --- a/isso/views/comments.py +++ b/isso/views/comments.py @@ -925,7 +925,7 @@ class API(object): content = ET.SubElement(entry, 'content', { 'type': 'html', }) - content.text = comment['text'] + content.text = self.isso.render(comment['text']) if comment['parent']: ET.SubElement(entry, 'thr:in-reply-to', {