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