From 8d66b62fcede2c174409ffb0a0a46ce3bcd6a67c Mon Sep 17 00:00:00 2001 From: iliajie Date: Fri, 2 Jun 2023 11:25:27 +0300 Subject: [PATCH] Add to use `HTML::Entities` to try to decode all possible entities https://github.com/webmin/webmin/pull/1917#discussion_r1213969328 --- web-lib-funcs.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 83d4ac01d..63b9e7ffa 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -284,6 +284,10 @@ $str =~ s/"/"/g; $str =~ s/'/'/g; $str =~ s/=/=/g; $str =~ s/ / /g; +eval "use HTML::Entities"; +if (!$@) { + $str = decode_entities($str); + } return $str; }