mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
Deprecate urlize_quoted_links in favor of Django's built-in urlize
This commit is contained in:
parent
f3d9d68970
commit
4121b01b91
|
@ -8,7 +8,7 @@ ______ _____ _____ _____ __
|
|||
"""
|
||||
|
||||
__title__ = 'Django REST framework'
|
||||
__version__ = '3.11.1'
|
||||
__version__ = '3.11.2'
|
||||
__author__ = 'Tom Christie'
|
||||
__license__ = 'BSD 3-Clause'
|
||||
__copyright__ = 'Copyright 2011-2019 Encode OSS Ltd'
|
||||
|
|
|
@ -418,7 +418,7 @@ class BrowsableAPIRenderer(BaseRenderer):
|
|||
if render_style == 'binary':
|
||||
return '[%d bytes of binary content]' % len(content)
|
||||
|
||||
return content
|
||||
return content.decode('utf-8') if isinstance(content, bytes) else content
|
||||
|
||||
def show_form_for_method(self, view, method, request, obj):
|
||||
"""
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
<div class="region" aria-label="{% trans "request form" %}">
|
||||
{% block request_forms %}
|
||||
|
||||
|
||||
{% if 'GET' in allowed_methods %}
|
||||
<form id="get-form" class="pull-right">
|
||||
<fieldset>
|
||||
|
@ -176,9 +176,9 @@
|
|||
|
||||
<div class="response-info" aria-label="{% trans "response info" %}">
|
||||
<pre class="prettyprint"><span class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% for key, val in response_headers|items %}
|
||||
<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize_quoted_links }}</span>{% endfor %}
|
||||
<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize }}</span>{% endfor %}
|
||||
|
||||
</span>{{ content|urlize_quoted_links }}</pre>
|
||||
</span>{{ content|urlize }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user