• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

allura


Commit MetaInfo

修訂e6846e54f1f663efcaada498bfc2db5b2aab3260 (tree)
時間2012-05-11 06:32:05
作者Rick Copeland <rick@arbo...>
CommiterJenny Steele

Log Message

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

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

Change Summary

差異

--- 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'))