Ticket #5396: trunc_email.diff
File trunc_email.diff, 900 bytes (added by , 17 years ago) |
---|
-
html.py
86 86 if middle.startswith('http://') or middle.startswith('https://'): 87 87 middle = '<a href="%s"%s>%s</a>' % (middle, nofollow_attr, trim_url(middle)) 88 88 if '@' in middle and not middle.startswith('www.') and not ':' in middle \ 89 and simple_email_re.match(middle): 90 middle = '<a href="mailto:%s">%s</a>' % (middle, middle) 89 and simple_email_re.match(middle) and len(middle.split('@')) == 2: 90 name, domain = middle.split('@') 91 middle = '<a href="mailto:%s">%s@%s</a>' % (middle, trim_url(name), domain) 91 92 if lead + middle + trail != word: 92 93 words[i] = lead + middle + trail 93 94 return u''.join(words)