diff --git a/www/pgm2/fhemweb.js b/www/pgm2/fhemweb.js index fdc3b5ab0..3f302c8ea 100644 --- a/www/pgm2/fhemweb.js +++ b/www/pgm2/fhemweb.js @@ -160,8 +160,14 @@ FW_jqueryReadyFn() "="+encodeURIComponent($(this).val()); }); FW_cmd(FW_root+"?"+cmd+"&XHR=1&addLinks=1", function(data) { - if(!data.match(/^[\r\n]*$/)) // ignore empty answers - FW_okDialog('
'+data+'', el); + if(!data.match(/^[\r\n]*$/)) {// ignore empty answers + var ma = /^([\s\S]*)<\/html>/.exec(data); + if(ma) { + FW_okDialog(ma[1], el); + } else { + FW_okDialog('
'+data+'', el); + } + } }); }); @@ -1005,7 +1011,7 @@ FW_doUpdate(evt) if(d[2].match(/\n/) && !d[2].match(/<.*>/)) // format multiline d[2] = '
'+d[2]+''; - var ma = /^([\s\S]*)<\/html>$/.exec(d[2]); + var ma = /^([\s\S]*)<\/html>/.exec(d[2]); if(!d[0].match("-")) // not a reading $(this).html(d[2]); else if(ma)