Skip to content
Myr

Fixed an issue about urlize function

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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>'

authored by mozillazg · committed by mozillazg · parent 21a2010 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:jinja2/utils.py+1 added
282 unmodified lines
283 lead, middle, trail = match.groups()284 if middle.startswith('www.') or (285 '@' not in middle and286 not middle.startswith('http://') and287 not middle.startswith('https://') and288 len(middle) > 0 and289 middle[0] in _letters + _digits and (290 middle.endswith('.org') or291 middle.endswith('.net') or
330 unmodified lines