2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 07:24:21 +00:00

HttpUtils.pm: accept quote in charset (Forum #138273)

git-svn-id: https://svn.fhem.de/fhem/trunk@28888 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2024-05-19 19:14:27 +00:00
parent c4fa11ebed
commit a0afbbb576

View File

@ -1059,6 +1059,7 @@ HttpUtils_ParseAnswer($)
$hash->{httpheader} =~ m/^Content-Type.*charset=(\S*)/im ? $1 :
'UTF-8';
if($unicodeEncoding && $encoding) {
$encoding =~ s/["']//g; #138273
eval { $ret = Encode::decode($encoding, $ret) };
return $@ if($@);
}