]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
dns.cgi: Remove the decode and encode lines as now integrated in header.pl
authorAdolf Belka <adolf.belka@ipfire.org>
Mon, 17 Jun 2024 11:12:36 +0000 (13:12 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Jul 2024 09:13:10 +0000 (09:13 +0000)
- decode and encode lines have now been integrated into the cleanhtml subroutine in
   header.pl so that all uses of cleanhtml will be able to handle diacritical characters

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/dns.cgi

index 1181523d473694e88c100f5004b180730c60f621..0d3b14797a6e930284550fc31693b93a9874f571 100644 (file)
@@ -21,7 +21,6 @@
 
 use strict;
 use IO::Socket;
-use Encode;
 
 # enable only the following on debugging purpose
 #use warnings;
@@ -143,18 +142,8 @@ 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'});
 
-               # encode the text back to UTF-8 after running the cleanhtml command
-               $cgiparams{'REMARK'} = encode("UTF-8", $cgiparams{'REMARK'});
-
                my %dns_servers = ();
                my $id;
                my $status;