From ca4ef5acf013f667cae959cb633fa55621c9e158 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 11 May 2008 13:23:36 -0300 Subject: [PATCH 1/1] Convert to unicode before encoding to UTF-8 in firewall template (fixes #16). --- pymin/services/firewall/templates/iptables.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymin/services/firewall/templates/iptables.sh b/pymin/services/firewall/templates/iptables.sh index 80f4a32..e384d0e 100644 --- a/pymin/services/firewall/templates/iptables.sh +++ b/pymin/services/firewall/templates/iptables.sh @@ -4,7 +4,7 @@ # TODO escape shell commands more securely def s(text): - return repr(text.encode('utf-8')) + return repr(unicode(text).encode('utf-8')) def optional(switch, value): if value is not None: -- 2.43.0