allura
Revision | f5df86a45ddf2b198e6ec865f5e3567c1d5792f7 (tree) |
---|---|
Time | 2012-05-15 00:09:12 |
Author | Rick Copeland <rick@arbo...> |
Commiter | Yaroslav Luzin |
[#3940] Make forum markdown description display on forum index page
Signed-off-by: Rick Copeland <rick@arborian.com>
@@ -35,7 +35,7 @@ | ||
35 | 35 | <tr> |
36 | 36 | <td> |
37 | 37 | <strong><a href="{{forum.url()}}">{{forum.name}}</a></strong><br> |
38 | - {{forum.description}} | |
38 | + {{g.markdown.convert(forum.description)}} | |
39 | 39 | {% if forum.deleted %} |
40 | 40 | <div class="notice">This forum has been deleted and is not visible to non-admin users</div> |
41 | 41 | {% endif %} |
@@ -272,6 +272,15 @@ class TestForum(TestController): | ||
272 | 272 | r = self.app.get('/admin/discussion/forums') |
273 | 273 | assert u'téstforum'.encode('utf-8') in r |
274 | 274 | |
275 | + def test_markdown_description(self): | |
276 | + r = self.app.get('/admin/discussion/forums') | |
277 | + r.forms[1]['add_forum.shortname'] = 'tester' | |
278 | + r.forms[1]['add_forum.name'] = 'Tester' | |
279 | + r.forms[1]['add_forum.description'] = '<a href="http://cnn.com">This is CNN</a>' | |
280 | + r.forms[1].submit() | |
281 | + r = self.app.get('/discussion/') | |
282 | + assert_equal(len(r.html.findAll('a', rel='nofollow')), 1) | |
283 | + | |
275 | 284 | def test_forum_search(self): |
276 | 285 | r = self.app.get('/discussion/search') |
277 | 286 | r = self.app.get('/discussion/search', params=dict(q='foo')) |