From e7861ec5d432638b2d4b722f3e60700c105015e2 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 8 Feb 2021 15:08:08 +0100 Subject: [PATCH] Improved QueryStringSerializer regex. --- benedict/serializers/query_string.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benedict/serializers/query_string.py b/benedict/serializers/query_string.py index aeed4ab..7161c3b 100644 --- a/benedict/serializers/query_string.py +++ b/benedict/serializers/query_string.py @@ -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)