2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 09:55:38 +00:00

01_FHEMWEB.pm: fix the quoting for attribute types (Forum #134526)

git-svn-id: https://svn.fhem.de/fhem/trunk@27823 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2023-08-07 15:28:24 +00:00
parent fd98470126
commit 6fa6b598cf

View File

@ -1600,8 +1600,16 @@ FW_doDetail($)
$attrList =~ s/\bgroup\b/group:$groupList/;
$attrList = FW_widgetOverride($d, $attrList, "attr");
$attrList =~ s/\\/\\\\/g;
$attrList =~ s/'/\\'/g;
if($attrList =~ m/[\\']/) {
$attrList =~ s/([\\'])/\\$1/g;
foreach my $k (keys %attrTypeHash) { # Forum #134526
if($k =~ m/[\\']/) {
my $nk = $k;
$nk =~ s/([\\'])/\\$1/g;
$attrTypeHash{$nk} = $attrTypeHash{$k};
}
}
}
FW_pO FW_detailSelect($d, "attr", $attrList, undef, \%attrTypeHash);
FW_makeTable("Attributes", $d, $attr{$d}, "deleteattr");
@ -2028,7 +2036,7 @@ sub
FW_showRoom()
{
my $roomRe = $FW_room;
$roomRe =~ s/([[\]().+*?])/\\$1/g;
$roomRe =~ s/([[\\\]().+*?])/\\$1/g;
return 0 if(!$FW_room ||
AttrVal($FW_wname,"forbiddenroom","") =~ m/\b$roomRe\b/);