equal
deleted
inserted
replaced
239 def nl2br(text): |
239 def nl2br(text): |
240 '''replace raw newlines with xhtml line breaks.''' |
240 '''replace raw newlines with xhtml line breaks.''' |
241 return text.replace('\n', '<br/>\n') |
241 return text.replace('\n', '<br/>\n') |
242 |
242 |
243 def obfuscate(text): |
243 def obfuscate(text): |
|
244 text = unicode(text, 'utf-8', 'replace') |
244 return ''.join(['&#%d;' % ord(c) for c in text]) |
245 return ''.join(['&#%d;' % ord(c) for c in text]) |
245 |
246 |
246 def domain(author): |
247 def domain(author): |
247 '''get domain of author, or empty string if none.''' |
248 '''get domain of author, or empty string if none.''' |
248 f = author.find('@') |
249 f = author.find('@') |