commit | 6644893ecb1d8a585990e2f47f2f4e37c3ea2ff8 | [log] [tgz] |
---|---|---|
author | mozillazg <opensource.mozillazg@gmail.com> | Mon Mar 18 14:27:54 2013 +0800 |
committer | mozillazg <opensource.mozillazg@gmail.com> | Mon Mar 18 14:27:54 2013 +0800 |
tree | 249e7cb8b240056ea1317dc214f45e41cbbbdfe3 | |
parent | 21a2010bf2768bc658e09666c2135063ce004efc [diff] [blame] |
Fixed an issue about urlize function When URL startswith 'https://', the return is wrong. Before: >>> urlize('https://github.com/') u'<a href="http://https://github.com/">https://github.com/</a>' After: >>> urlize('https://github.com/') u'<a href="https://github.com/">https://github.com/</a>'
diff --git a/jinja2/utils.py b/jinja2/utils.py index 568c63f..402718d 100644 --- a/jinja2/utils.py +++ b/jinja2/utils.py
@@ -284,6 +284,7 @@ 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