mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
Fixes #1649 - Escaping (ampersand) in browsable API URLs
This commit is contained in:
parent
b175751614
commit
ed53ffb9cd
|
@ -198,7 +198,7 @@ def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=Tru
|
||||||
trimmed = trim_url(middle)
|
trimmed = trim_url(middle)
|
||||||
if autoescape and not safe_input:
|
if autoescape and not safe_input:
|
||||||
lead, trail = escape(lead), escape(trail)
|
lead, trail = escape(lead), escape(trail)
|
||||||
url, trimmed = escape(url), escape(trimmed)
|
trimmed = escape(trimmed)
|
||||||
middle = '<a href="%s"%s>%s</a>' % (url, nofollow_attr, trimmed)
|
middle = '<a href="%s"%s>%s</a>' % (url, nofollow_attr, trimmed)
|
||||||
words[i] = mark_safe('%s%s%s' % (lead, middle, trail))
|
words[i] = mark_safe('%s%s%s' % (lead, middle, trail))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user