Improved QueryStringSerializer regex.
This commit is contained in:
parent
0282ddbb50
commit
e7861ec5d4
|
@ -23,7 +23,7 @@ class QueryStringSerializer(AbstractSerializer):
|
||||||
|
|
||||||
def decode(self, s, **kwargs):
|
def decode(self, s, **kwargs):
|
||||||
flat = kwargs.pop('flat', True)
|
flat = kwargs.pop('flat', True)
|
||||||
qs_re = r'^(([\w\-\%\+]+\=[\w\-\%\+]*)+([\&]{1})?)+'
|
qs_re = r'(?:([\w\-\%\+\.\|]+\=[\w\-\%\+\.\|]*)+(?:[\&]{1})?)+'
|
||||||
qs_pattern = re.compile(qs_re)
|
qs_pattern = re.compile(qs_re)
|
||||||
if qs_pattern.match(s):
|
if qs_pattern.match(s):
|
||||||
data = parse_qs(s)
|
data = parse_qs(s)
|
||||||
|
|
Loading…
Reference in New Issue