equal
deleted
inserted
replaced
201 def nl2br(text): |
201 def nl2br(text): |
202 '''replace raw newlines with xhtml line breaks.''' |
202 '''replace raw newlines with xhtml line breaks.''' |
203 return text.replace('\n', '<br/>\n') |
203 return text.replace('\n', '<br/>\n') |
204 |
204 |
205 def obfuscate(text): |
205 def obfuscate(text): |
206 text = unicode(text, 'utf-8', 'replace') |
206 text = unicode(text, util._encoding, 'replace') |
207 return ''.join(['&#%d;' % ord(c) for c in text]) |
207 return ''.join(['&#%d;' % ord(c) for c in text]) |
208 |
208 |
209 def domain(author): |
209 def domain(author): |
210 '''get domain of author, or empty string if none.''' |
210 '''get domain of author, or empty string if none.''' |
211 f = author.find('@') |
211 f = author.find('@') |