diff options
| author | Tom Christie | 2011-05-27 16:11:06 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-05-27 16:11:06 +0100 |
| commit | e2052f858b271d991f1ed2eea4cbaac0a00161a8 (patch) | |
| tree | d52b9b6c9f87d2b40a98a62c7a2c0b641146cf0d | |
| parent | 21d2dcc2942a8e4adb3a79b0983841e5f0ab5878 (diff) | |
| download | django-rest-framework-e2052f858b271d991f1ed2eea4cbaac0a00161a8.tar.bz2 | |
Fixes github #17
| -rw-r--r-- | djangorestframework/templatetags/urlize_quoted_links.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/templatetags/urlize_quoted_links.py b/djangorestframework/templatetags/urlize_quoted_links.py index eea424a4..bd3cbcf5 100644 --- a/djangorestframework/templatetags/urlize_quoted_links.py +++ b/djangorestframework/templatetags/urlize_quoted_links.py @@ -63,11 +63,11 @@ def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=Tru # Make URL we want to point to. url = None if middle.startswith('http://') or middle.startswith('https://'): - url = urlquote(middle, safe='/&=:;#?+*') + url = middle elif middle.startswith('www.') or ('@' not in middle and \ 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='/&=:;#?+*') + url = 'http://%s' % middle elif '@' in middle and not ':' in middle and simple_email_re.match(middle): url = 'mailto:%s' % middle nofollow_attr = '' |
