mercurial/templater.py
changeset 3906 1063a631cb8e
parent 3893 6b4127c7d52a
parent 3904 0dd07dd63db3
child 4336 35ad84669ca5
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('@')