2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

fhemweb.js: fix strange set parameters (Forum #68142)

git-svn-id: https://svn.fhem.de/fhem/trunk@13701 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-03-14 17:21:25 +00:00
parent b3993de5e2
commit ba83f3a300

View File

@ -640,7 +640,8 @@ FW_inlineModify() // Do not generate a new HTML page upon pressing modify
cmd = $(div).attr("cmd"); cmd = $(div).attr("cmd");
var sel = $(this).closest("form").find("select"); var sel = $(this).closest("form").find("select");
var arg = $(sel).val(); var arg = $(sel).val();
var ifid = (devName+"-"+arg).replace(/\./g, '\\.'); var ifid = (devName+"-"+arg).replace(/([^_a-z0-9])/gi,
function(m){ return "\\"+m });
if($(".dval[informid="+ifid+"]").length == 0) { if($(".dval[informid="+ifid+"]").length == 0) {
console.log(this); console.log(this);
$(this).unbind('click').click();// No element found to replace, reload $(this).unbind('click').click();// No element found to replace, reload
@ -1062,7 +1063,7 @@ function
FW_queryValue(cmd, el) FW_queryValue(cmd, el)
{ {
log("FW_queryValue:"+cmd); log("FW_queryValue:"+cmd);
var query = location.pathname+"?cmd="+cmd+"&XHR=1"; var query = location.pathname+"?cmd="+encodeURIComponent(cmd)+"&XHR=1";
query = addcsrf(query); query = addcsrf(query);
var qConn = new XMLHttpRequest(); var qConn = new XMLHttpRequest();
qConn.onreadystatechange = function() { qConn.onreadystatechange = function() {