]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/dns.cgi
dns.cgi: Fixes bug#12395 - German umlauts not correctly displayed in remarks
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / dns.cgi
index 0a34d3fd6c59e3c430a7b406dca4994adf966d98..eb6f908d50140ecde03c54594023dcce1912ef0d 100644 (file)
@@ -142,6 +142,13 @@ if (($cgiparams{'SERVERS'} eq $Lang::tr{'save'}) || ($cgiparams{'SERVERS'} eq $L
        # Go further if there was no error.
        if ( ! $errormessage) {
                # Check if a remark has been entered.
+
+               # decode the UTF-8 text so that characters with diacritical marks such as
+               # umlauts are treated correctly by the following cleanhtml command
+               $cgiparams{'REMARK'} = decode("UTF-8", $cgiparams{'REMARK'});
+
+               # run the REMARK text through cleanhtml to ensure all unsafe html characters
+               # are correctly encoded to their html entities
                $cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'});
 
                my %dns_servers = ();