From 3b3fac3ac359e7d5298f0c0bc87b30dffa9766e2 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 14 Mar 2019 18:29:39 +0000 Subject: [PATCH] www/pgm2/fhemweb.js: remove
 Formatting for  data

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18903 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
 www/pgm2/fhemweb.js | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

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)