mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Properly escape URLs when replacing query parameter
This commit is contained in:
parent
65a0d083d6
commit
b5c98f686d
|
@ -22,7 +22,7 @@ def replace_query_param(url, key, val):
|
||||||
query_dict = QueryDict(query).copy()
|
query_dict = QueryDict(query).copy()
|
||||||
query_dict[key] = val
|
query_dict[key] = val
|
||||||
query = query_dict.urlencode()
|
query = query_dict.urlencode()
|
||||||
return urlparse.urlunsplit((scheme, netloc, path, query, fragment))
|
return escape(urlparse.urlunsplit((scheme, netloc, path, query, fragment)))
|
||||||
|
|
||||||
|
|
||||||
# Regex for adding classes to html snippets
|
# Regex for adding classes to html snippets
|
||||||
|
|
Loading…
Reference in New Issue
Block a user