]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
dns.cgi: Fixes bug#12395 - German umlauts not correctly displayed in remarks
authorAdolf Belka <adolf.belka@ipfire.org>
Wed, 28 Feb 2024 13:35:26 +0000 (14:35 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Feb 2024 16:10:28 +0000 (16:10 +0000)
- If Freifunk München e.V. is entered as a remark it gets converted to
   Freifunk München e.V.
- This is because cleanhtml is used on the remark text before saving it to the file  and
   the HTML::Entities::encode_entities command that is run on that remark text encodes all
   higher bit characters as unsafe characters and replaces them with their HTML entity
   representation.
- Have tested out the remark with a range of different characters with diacritical marks
   and all of the ones tested were re-written.
- The use of the cleanhtml makes sense when used on URL's or on text that is going to be
   printed as part of the HTML code for a page but it doesn't seem to make sense for text
   used in a remark.
- The cleanhtml function is only used on the remark text in dns.cgi and not on any other
   entries on the page.
- Removing the call to the cleanhtml function results in the German umlauts being printed
   in the remark section.
- Many of the WUI pages have the cleanhtml function used on remark or comment text.
- fwhosts.cgi does not use cleanhtml anywhere. So all its remark sections work with
   characters with diacritical marks.
- If this patch is accepted, I will then submit patches for the other WUI pages where
   characters with diacritical marks are re-written in remark or comment sections.

Fixes: Bug#12395
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 0a34d3fd6c59e3c430a7b406dca4994adf966d98..f3dd5c7a915e38bc6089129121ad51bef76e5427 100644 (file)
@@ -141,8 +141,6 @@ 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.
-               $cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'});
 
                my %dns_servers = ();
                my $id;