From: mozillazg Date: Mon, 18 Mar 2013 06:27:54 +0000 (+0800) Subject: Fixed an issue about urlize function X-Git-Tag: 2.7~94^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6644893ecb1d8a585990e2f47f2f4e37c3ea2ff8;p=thirdparty%2Fjinja.git Fixed an issue about urlize function When URL startswith 'https://', the return is wrong. Before: >>> urlize('https://github.com/') u'https://github.com/' After: >>> urlize('https://github.com/') u'https://github.com/' --- diff --git a/jinja2/utils.py b/jinja2/utils.py index 568c63f9..402718d9 100644 --- a/jinja2/utils.py +++ b/jinja2/utils.py @@ -284,6 +284,7 @@ def urlize(text, trim_url_limit=None, nofollow=False): if middle.startswith('www.') or ( '@' not in middle and not middle.startswith('http://') and + not middle.startswith('https://') and len(middle) > 0 and middle[0] in _letters + _digits and ( middle.endswith('.org') or