2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

fhemweb.js: fix dropdown setting, where space is involved (Forum #116178)

git-svn-id: https://svn.fhem.de/fhem/trunk@23239 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-11-26 17:17:49 +00:00
parent 1cafd490e7
commit 6c07e00b40

View File

@ -1471,9 +1471,9 @@ FW_createSelect(elName, devName, vArr, currVal, set, params, cmd)
var vHash = {};
for(var j=1; j < vArr.length; j++) {
var o = document.createElement('option');
if(!vArr[j].match(/&#[0-9a-f]{1,4};/i))
if(!vArr[j].match(/&#[0-9a-f]{1,4};/i)) // how to reproduce?
o.text = o.value = vArr[j].replace(/#/g," ");
vHash[vArr[j]] = 1;
vHash[o.value] = 1;
newEl.options[j-1] = o;
}
if(currVal)