diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index 8de2b785a..ed890182a 100755 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -447,7 +447,7 @@ FW_answerCall($) return FW_serveSpecial($1, "js", $FW_jsdir, 1); } elsif($arg =~ m,^$FW_ME/icons/(.*)$,) { - my ($icon,$cacheable) = ($1, 1); + my ($icon,$cacheable) = (urlDecode($1), 1); #Debug "You want $icon which is " . $FW_icons{$icon}; # if we do not have the icon, we convert the device state to the icon name $icon =~ s/\.($ICONEXTENSION)$//; diff --git a/fhem/FHEM/HttpUtils.pm b/fhem/FHEM/HttpUtils.pm index 93f0080d7..523499d8d 100644 --- a/fhem/FHEM/HttpUtils.pm +++ b/fhem/FHEM/HttpUtils.pm @@ -42,6 +42,14 @@ urlEncode($) { return $_; } +################## +sub +urlDecode($) { + $_= $_[0]; + s/%([0-9A-F][0-9A-F])/chr(hex($1))/egi; + return $_; +} + ################## # - if data (which is urlEncoded) is set, then a POST is performed, else a GET. # - noshutdown must be set for e.g the Fritz!Box