captive: Escape any special characters in title on PDF vouchers
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 11:57:37 +0000 (11:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 11:57:55 +0000 (11:57 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/117/filelists/files
html/cgi-bin/captive.cgi

index eafb9f1..88473a4 100644 (file)
@@ -5,6 +5,7 @@ etc/rc.d/init.d/apache
 etc/ssl/certs/ca-bundle.crt
 etc/ssl/certs/ca-bundle.trust.crt
 opt/pakfire/lib/functions.pl
+srv/web/ipfire/cgi-bin/captive.cgi
 srv/web/ipfire/cgi-bin/country.cgi
 srv/web/ipfire/cgi-bin/logs.cgi/config.dat
 srv/web/ipfire/cgi-bin/logs.cgi/firewalllog.dat
index 113c29f..f3bb28c 100755 (executable)
@@ -757,7 +757,7 @@ sub generate_pdf() {
                        $f_subheadline->translate($cx, ($y + $h - $cy) / 2.4 + $cy);
 
                        if ($settings{'TITLE'}) {
-                               $f_headline->text_center($settings{'TITLE'});
+                               $f_headline->text_center(decode("utf8", $settings{'TITLE'}));
                                $f_subheadline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupon'}));
                        } else {
                                $f_headline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupon'}));