From 60d19daf8d92a0a76e8cf1ab3c38cd4c853c5dfe Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 24 Feb 2017 07:54:45 +0000 Subject: [PATCH] fhem.pl/fhemweb.js: fixing the perl syntax checks (Forum #52242) git-svn-id: https://svn.fhem.de/fhem/trunk@13499 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 5 +++++ fhem/www/pgm2/fhemweb.js | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 5d59d3ef8..a0202c85b 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -4844,6 +4844,11 @@ parseParams($;$) if( !defined( $value ) ) { $value = $key; $key = undef; + + # the key can not start with a { -> it must be a perl expression + } elsif( $key =~ m/^\s*{/ ) { + $value = "$key = $value"; + $key = undef; } #collect all parts until the closing ' or " diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index f118463f0..6669b7715 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -603,8 +603,11 @@ FW_inlineModify() // Do not generate a new HTML page upon pressing modify } FW_cmd(FW_root+"?"+encodeURIComponent(cmd)+"&XHR=1", function(resp){ - if(resp) + if(resp) { + if(resp.indexOf("\n") >= 0) + resp = '
'+resp+''; return FW_okDialog(resp); + } newDef = newDef.replace(/&/g, '&') // Same as in 01_FHEMWEB .replace(//g, '>');