From 5fd7ac26d12310fb026f230cd0c87317a914bcdb Mon Sep 17 00:00:00 2001 From: antonbormotov Date: Fri, 21 Sep 2018 20:24:35 +0800 Subject: [PATCH] Encode input arguments in directive_factory function --- gixy/parser/nginx_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gixy/parser/nginx_parser.py b/gixy/parser/nginx_parser.py index 38c3f8b..9572df4 100644 --- a/gixy/parser/nginx_parser.py +++ b/gixy/parser/nginx_parser.py @@ -76,7 +76,7 @@ class NginxParser(object): self.parse_block(children, inst) return inst else: - args = [str(v).strip() for v in parsed_args] + args = [str(v.encode("utf-8")).strip() for v in parsed_args] return klass(parsed_name, args) def _get_directive_class(self, parsed_type, parsed_name):