mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-25 07:53:17 +03:00
Parse url when adding query param.
This commit is contained in:
parent
f21107396a
commit
863bbe7684
|
@ -5,7 +5,7 @@ register = Library()
|
||||||
|
|
||||||
def add_query_param(url, param):
|
def add_query_param(url, param):
|
||||||
(key, sep, val) = param.partition('=')
|
(key, sep, val) = param.partition('=')
|
||||||
return unicode(URLObject(url) & (key, val))
|
return unicode(URLObject.parse(url) & (key, val))
|
||||||
|
|
||||||
|
|
||||||
register.filter('add_query_param', add_query_param)
|
register.filter('add_query_param', add_query_param)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user