From 6644893ecb1d8a585990e2f47f2f4e37c3ea2ff8 Mon Sep 17 00:00:00 2001 From: mozillazg Date: Mon, 18 Mar 2013 14:27:54 +0800 Subject: [PATCH] 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/' --- jinja2/utils.py | 1 + 1 file changed, 1 insertion(+) 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 -- 2.47.2