def check_nl2br(self): assert str(nl2br('a\nb\nc')) == 'a<br />\nb<br />\nc'
def _render_error(self, error): if error: return htmltext('<font color="red">%s</font><br />') % nl2br(error) else: return ''