Improved QueryStringSerializer regex.

This commit is contained in:
Fabio Caccamo 2021-02-08 15:08:08 +01:00
parent 0282ddbb50
commit e7861ec5d4
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ class QueryStringSerializer(AbstractSerializer):
def decode(self, s, **kwargs):
flat = kwargs.pop('flat', True)
qs_re = r'^(([\w\-\%\+]+\=[\w\-\%\+]*)+([\&]{1})?)+'
qs_re = r'(?:([\w\-\%\+\.\|]+\=[\w\-\%\+\.\|]*)+(?:[\&]{1})?)+'
qs_pattern = re.compile(qs_re)
if qs_pattern.match(s):
data = parse_qs(s)