mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-05 14:29:35 +00:00
01_FHEMWEB.pm: Fix stacktrace,UnicodeEncoding+Umlaut in roomname (Forum #128362)
git-svn-id: https://svn.fhem.de/fhem/trunk@26240 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4562c63504
commit
1ac71b68ac
@ -468,7 +468,8 @@ FW_Read($$)
|
|||||||
} @FW_httpheader;
|
} @FW_httpheader;
|
||||||
if(!$hash->{encoding}) {
|
if(!$hash->{encoding}) {
|
||||||
my $ct = $FW_httpheader{"Content-Type"};
|
my $ct = $FW_httpheader{"Content-Type"};
|
||||||
$hash->{encoding} = ($ct && $ct =~ m/charset\s*=\s*(\S*)/i ? $1 : $FW_encoding);
|
$hash->{encoding} =
|
||||||
|
($ct && $ct =~ m/charset\s*=\s*(\S*)/i ? $1 : $FW_encoding);
|
||||||
}
|
}
|
||||||
delete($hash->{HDR});
|
delete($hash->{HDR});
|
||||||
|
|
||||||
@ -679,7 +680,7 @@ FW_initInform($$)
|
|||||||
$FW_id2inform{$FW_id} = $me if($FW_id);
|
$FW_id2inform{$FW_id} = $me if($FW_id);
|
||||||
|
|
||||||
my $filter = $me->{inform}{filter};
|
my $filter = $me->{inform}{filter};
|
||||||
$filter =~ s/([[\]().+?])/\\$1/g if($filter =~ m/room=/); # Forum #80390
|
$filter =~ s/([[\]().+*?])/\\$1/g; #80390, #128362
|
||||||
$filter = "NAME=.*" if($filter eq "room=all");
|
$filter = "NAME=.*" if($filter eq "room=all");
|
||||||
$filter = "room!=.+" if($filter eq "room=Unsorted");
|
$filter = "room!=.+" if($filter eq "room=Unsorted");
|
||||||
|
|
||||||
@ -1982,8 +1983,10 @@ FW_sortIndex($)
|
|||||||
sub
|
sub
|
||||||
FW_showRoom()
|
FW_showRoom()
|
||||||
{
|
{
|
||||||
|
my $roomRe = $FW_room;
|
||||||
|
$roomRe =~ s/([[\]().+*?])/\\$1/g;
|
||||||
return 0 if(!$FW_room ||
|
return 0 if(!$FW_room ||
|
||||||
AttrVal($FW_wname,"forbiddenroom","") =~ m/\b$FW_room\b/);
|
AttrVal($FW_wname,"forbiddenroom","") =~ m/\b$roomRe\b/);
|
||||||
|
|
||||||
%FW_hiddengroup = ();
|
%FW_hiddengroup = ();
|
||||||
foreach my $r (split(",",AttrVal($FW_wname, "hiddengroup", ""))) {
|
foreach my $r (split(",",AttrVal($FW_wname, "hiddengroup", ""))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user