mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
Allow space in icon names
git-svn-id: https://svn.fhem.de/fhem/trunk@2576 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
189aa8600b
commit
3ea43e6daa
@ -447,7 +447,7 @@ FW_answerCall($)
|
|||||||
return FW_serveSpecial($1, "js", $FW_jsdir, 1);
|
return FW_serveSpecial($1, "js", $FW_jsdir, 1);
|
||||||
|
|
||||||
} elsif($arg =~ m,^$FW_ME/icons/(.*)$,) {
|
} 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};
|
#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
|
# if we do not have the icon, we convert the device state to the icon name
|
||||||
$icon =~ s/\.($ICONEXTENSION)$//;
|
$icon =~ s/\.($ICONEXTENSION)$//;
|
||||||
|
@ -42,6 +42,14 @@ urlEncode($) {
|
|||||||
return $_;
|
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.
|
# - 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
|
# - noshutdown must be set for e.g the Fritz!Box
|
||||||
|
Loading…
x
Reference in New Issue
Block a user