From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] dns.cgi: Remove the decode and encode lines as now integrated in header.pl Date: Mon, 17 Jun 2024 13:12:36 +0200 Message-ID: <20240617111236.2926-2-adolf.belka@ipfire.org> In-Reply-To: <20240617111236.2926-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0056222722815757122==" List-Id: --===============0056222722815757122== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - decode and encode lines have now been integrated into the cleanhtml subrout= ine in header.pl so that all uses of cleanhtml will be able to handle diacritical= characters Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/dns.cgi | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 1181523d4..0d3b14797 100644 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -21,7 +21,6 @@ =20 use strict; use IO::Socket; -use Encode; =20 # enable only the following on debugging purpose #use warnings; @@ -143,18 +142,8 @@ if (($cgiparams{'SERVERS'} eq $Lang::tr{'save'}) || ($cg= iparams{'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'} =3D decode("UTF-8", $cgiparams{'REMARK'}); - - # run the REMARK text through cleanhtml to ensure all unsafe html characte= rs - # are correctly encoded to their html entities $cgiparams{'REMARK'} =3D &Header::cleanhtml($cgiparams{'REMARK'}); =20 - # encode the text back to UTF-8 after running the cleanhtml command - $cgiparams{'REMARK'} =3D encode("UTF-8", $cgiparams{'REMARK'}); - my %dns_servers =3D (); my $id; my $status; --=20 2.45.2 --===============0056222722815757122==--