コード例 #1
0
ファイル: utest_html.py プロジェクト: adorah/quixote
 def check_nl2br(self):
     assert str(nl2br('a\nb\nc')) == 'a<br />\nb<br />\nc'
コード例 #2
0
ファイル: form.py プロジェクト: guoyu07/douban-quixote
 def _render_error(self, error):
     if error:
         return htmltext('<font color="red">%s</font><br />') % nl2br(error)
     else:
         return ''
コード例 #3
0
ファイル: test_html.py プロジェクト: giorgil/quixote
 def check_nl2br(self):
     assert str(nl2br('a\nb\nc')) == 'a<br />\nb<br />\nc'