Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/templater.py @ 3906:1063a631cb8e
merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 16 Dec 2006 02:51:16 -0200 |
parents | 6b4127c7d52a 0dd07dd63db3 |
children | 35ad84669ca5 |
comparison
equal
deleted
inserted
replaced
3903:f9136599700f | 3906:1063a631cb8e |
---|---|
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('@') |