mirror of
https://github.com/django/django.git
synced 2025-06-03 10:39:12 +00:00
Fixed flake8 warnings.
This commit is contained in:
parent
df7187d795
commit
a4c23f70de
@ -284,9 +284,9 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False):
|
|||||||
"""
|
"""
|
||||||
if not safe_input:
|
if not safe_input:
|
||||||
return text, text, trail
|
return text, text, trail
|
||||||
unescaped = (text + trail).replace('&', '&').replace('<', '<'
|
unescaped = (text + trail).replace(
|
||||||
).replace('>', '>').replace('"', '"'
|
'&', '&').replace('<', '<').replace(
|
||||||
).replace(''', "'")
|
'>', '>').replace('"', '"').replace(''', "'")
|
||||||
# ';' in trail can be either trailing punctuation or end-of-entity marker
|
# ';' in trail can be either trailing punctuation or end-of-entity marker
|
||||||
if unescaped.endswith(';'):
|
if unescaped.endswith(';'):
|
||||||
return text, unescaped[:-1], trail
|
return text, unescaped[:-1], trail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user