dns.cgi: Remove the decode and encode lines as now integrated in header.pl

- 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>
This commit is contained in:
Adolf Belka
2024-06-17 13:12:36 +02:00
committed by Michael Tremer
parent eef090c3de
commit 43fea080eb

View 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;