Created attachment 751 [details] Field remark in Domain Name System Webpage Currently the WebIF for the Domain Name System does not accept German Umlauts as remark, as shown in the attachment. I've used remark: "Freifunk München e.V." Using latest Firefox on Windows 10 Pro German x64. IPFire core 144. Michael
I have just had a quick look at this. The problem is not limited to the DNS WUI page. You also get the same thing if you add Freifunk München e.V. as a remark into a DHCP fixed lease or an OpenVPN client connection remark. However interestingly enough it shows up correctly in the Firewall Groups WUI page for a Host name when added as a remark. I have had a look at the code for displaying the remark in the DNS versus that for the Host page but have not been able to identify anything that I would expect to make the difference. I have checked out all the remark boxes for the Networks, Hosts, Network/Host Groups and the Service Groups and the Freifunk München e.V. shows up correctly in all of them, so the fwhosts.cgi fixes the problem intrinsically but I have not been able to figure out yet how it has done that. Will continue looking.
Created attachment 1483 [details] Host definition showing the umlaut displayed in the WUI page
It looks like I may have figured out what is causing the issue. The remark text is fed through a cleanhtml function which ends up replacing all characters that are considered "unsafe" with their entity representation. That makes sense for anything that is going to be used for html printing on the WUI page because you don't want to have "unsafe" characters in the html as it may instruct the page to do unexpected things. However, it looks like all text, such as for comments and remarks on the cgi pages are fed through the cleanhtml function except for on the fwhosts.cgi page, which is the one that keeps the umlauts as intended and saves them correctly to the file. The HTML::Entities::encode_entities by default encodes control chars, high-bit chars, and the <, &, >, ' and " characters. The letters with umlauts (or other diacritical accents) are covered I believe by the high-bit chars and therefore all accented characters in remarks are replaced by their html entity representation. I will correct the dns.cgi one, as that is very simple as the cleanhtml is only used once in the code and that is only for the remark text. I will then separately modify the other WUI pages.
Patch submitted to the dev mailing list and patchwork. https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/thread/CZRB7ORKJ3LFLJP37TTI2NN3RW55O4AX/ https://patchwork.ipfire.org/project/ipfire/patch/20240228133526.6757-1-adolf.belka@ipfire.org/
Patch merged into next (will be CU 185) https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=7c6ff5ff12331a53f416080a44c8d6145e78bfac
Patch set in CU185 updated. https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=5a7342fc285425d226e52d988c0e35c23cd7547b https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=716b8fb503b5c02ac921cd843f8c646892c4cf55 https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=cd7a901109751cfa28b7cae01e04192aa17232b4
CU 185 Testing has been issued. https://www.ipfire.org/blog/ipfire-2-29-core-update-185-is-available-for-testing
The umlauts are verified to now be shown in the remark entry.
*** Bug 12330 has been marked as a duplicate of this bug. ***
https://www.ipfire.org/blog/ipfire-2-29-core-update-185-released