mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Fix URL escaping
This commit is contained in:
parent
96bb77dc35
commit
650a91ac24
|
@ -22,7 +22,7 @@ def replace_query_param(url, key, val):
|
|||
query_dict = QueryDict(query).copy()
|
||||
query_dict[key] = val
|
||||
query = query_dict.urlencode()
|
||||
return escape(urlparse.urlunsplit((scheme, netloc, path, query, fragment)))
|
||||
return urlparse.urlunsplit((scheme, netloc, path, query, fragment))
|
||||
|
||||
|
||||
# Regex for adding classes to html snippets
|
||||
|
@ -75,7 +75,7 @@ def add_query_param(request, key, val):
|
|||
"""
|
||||
iri = request.get_full_path()
|
||||
uri = iri_to_uri(iri)
|
||||
return replace_query_param(uri, key, val)
|
||||
return escape(replace_query_param(uri, key, val))
|
||||
|
||||
|
||||
@register.filter
|
||||
|
|
Loading…
Reference in New Issue
Block a user