• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

Revisiónf5df86a45ddf2b198e6ec865f5e3567c1d5792f7 (tree)
Tiempo2012-05-15 00:09:12
AutorRick Copeland <rick@arbo...>
CommiterYaroslav Luzin

Log Message

[#3940] Make forum markdown description display on forum index page

Signed-off-by: Rick Copeland <rick@arborian.com>

Cambiar Resumen

Diferencia incremental

--- a/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
+++ b/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
@@ -35,7 +35,7 @@
3535 <tr>
3636 <td>
3737 <strong><a href="{{forum.url()}}">{{forum.name}}</a></strong><br>
38- {{forum.description}}
38+ {{g.markdown.convert(forum.description)}}
3939 {% if forum.deleted %}
4040 <div class="notice">This forum has been deleted and is not visible to non-admin users</div>
4141 {% endif %}
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
@@ -272,6 +272,15 @@ class TestForum(TestController):
272272 r = self.app.get('/admin/discussion/forums')
273273 assert u'téstforum'.encode('utf-8') in r
274274
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+
275284 def test_forum_search(self):
276285 r = self.app.get('/discussion/search')
277286 r = self.app.get('/discussion/search', params=dict(q='foo'))