From 5471a00d94f6b659440a809bb1b574be387acbf1 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 19 Jul 2022 11:18:01 +0000 Subject: [PATCH] fhem.pl: warning+stacktrace for wrong devspec is now conditional (Forum #128362) git-svn-id: https://svn.fhem.de/fhem/trunk@26247 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 4 ++-- fhem/www/pgm2/fhemweb.js | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 06a02d5a4..d08acb40d 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -1360,8 +1360,8 @@ devspec2array($;$$) }; if($@) { - Log 1, "devspec2array $name: $@"; - stacktrace(); + warn "devspec2array $name: $@"; + stacktrace() if(AttrVal("global", "stacktrace", 0)); return $name; } } diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index f4dec3c89..f381a3a60 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -298,7 +298,7 @@ FW_jqueryReadyFn() var sa = location.search.substring(1).split("&"); for(var i = 0; i < sa.length; i++) { var kv = sa[i].split("="); - FW_urlParams[kv[0]] = kv[1]; + FW_urlParams[kv[0]] = decodeURIComponent(kv[1]); } $("select[id^=sel_attr],select[id^=sel_set],select[id^=sel_get]") @@ -1290,7 +1290,9 @@ FW_longpoll() } if(filter == "") { - if(FW_urlParams.room) filter="room="+FW_urlParams.room; + if(FW_urlParams.room) + filter="room="+FW_urlParams.room + .replace(/[[\]().+*?]/g, function(r){return '\\'+r}); if(FW_urlParams.detail) filter=FW_urlParams.detail; } @@ -1302,7 +1304,8 @@ FW_longpoll() if(content) { var room = content.getAttribute("room"); if(room) - filter="room="+room; + filter="room="+room + .replace(/[[\]().+*?]/g, function(r){return '\\'+r}); } }