diff --git a/django/utils/html.py b/django/utils/html.py
index 33e2ee3..20ab895 100644
a
|
b
|
def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False):
|
106 | 106 | urlquote(middle, safe='/&=:;#?+'), nofollow_attr, |
107 | 107 | trim_url(middle)) |
108 | 108 | if middle.startswith('http://') or middle.startswith('https://'): |
| 109 | middle = trim_url(middle) |
109 | 110 | middle = '<a href="%s"%s>%s</a>' % ( |
110 | 111 | urlquote(middle, safe='/&=:;#?+'), nofollow_attr, |
111 | | trim_url(middle)) |
| 112 | middle) |
112 | 113 | if '@' in middle and not middle.startswith('www.') and \ |
113 | 114 | not ':' in middle and simple_email_re.match(middle): |
114 | 115 | middle = '<a href="mailto:%s">%s</a>' % (middle, middle) |