1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

Modified at_pattern, disable adding link to email in seahub_urlize; Fixed repo create bug

This commit is contained in:
ZhengXie
2012-10-09 10:20:04 +08:00
parent d209f6074e
commit 1c6a40636c
5 changed files with 10 additions and 11 deletions

View File

@@ -62,9 +62,9 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False):
middle and middle[0] in string.ascii_letters + string.digits and \
(middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))):
url = urlquote('http://%s' % middle, safe='/&=:;#?+*%')
elif '@' in middle and not ':' in middle and simple_email_re.match(middle):
url = 'mailto:%s' % middle
nofollow_attr = ''
# elif '@' in middle and not ':' in middle and simple_email_re.match(middle):
# url = 'mailto:%s' % middle
# nofollow_attr = ''
# Make link.
if url:
trimmed = trim_url(middle)