From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] dns.cgi: Fixes bug#12395 - German umlauts not correctly displayed in remarks
Date: Wed, 28 Feb 2024 16:11:39 +0000 [thread overview]
Message-ID: <62B6E2EA-282A-48AA-8A23-DF745FB738FE@ipfire.org> (raw)
In-Reply-To: <20240228133526.6757-1-adolf.belka@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2251 bytes --]
Thank you for this patch.
Indeed we only need to escape once.
-Michael
> On 28 Feb 2024, at 13:35, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
>
> - 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(a)ipfire.org>
> Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
> ---
> html/cgi-bin/dns.cgi | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi
> index 0a34d3fd6..f3dd5c7a9 100644
> --- a/html/cgi-bin/dns.cgi
> +++ b/html/cgi-bin/dns.cgi
> @@ -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;
> --
> 2.44.0
>
prev parent reply other threads:[~2024-02-28 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 13:35 Adolf Belka
2024-02-28 16:11 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62B6E2EA-282A-48AA-8A23-DF745FB738FE@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox