Commit e2052f85 by Tom Christie

Fixes github #17

parent 21d2dcc2
...@@ -63,11 +63,11 @@ def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=Tru ...@@ -63,11 +63,11 @@ def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=Tru
# Make URL we want to point to. # Make URL we want to point to.
url = None url = None
if middle.startswith('http://') or middle.startswith('https://'): if middle.startswith('http://') or middle.startswith('https://'):
url = urlquote(middle, safe='/&=:;#?+*') url = middle
elif middle.startswith('www.') or ('@' not in middle and \ elif middle.startswith('www.') or ('@' not in middle and \
middle and middle[0] in string.ascii_letters + string.digits and \ middle and middle[0] in string.ascii_letters + string.digits and \
(middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))): (middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))):
url = urlquote('http://%s' % middle, safe='/&=:;#?+*') url = 'http://%s' % middle
elif '@' in middle and not ':' in middle and simple_email_re.match(middle): elif '@' in middle and not ':' in middle and simple_email_re.match(middle):
url = 'mailto:%s' % middle url = 'mailto:%s' % middle
nofollow_attr = '' nofollow_attr = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment