2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 05:06:35 +00:00

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
This commit is contained in:
rudolfkoenig 2017-02-24 07:54:45 +00:00
parent 4072c7931b
commit 60d19daf8d
2 changed files with 9 additions and 1 deletions

View File

@ -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 "

View File

@ -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 = '<pre>'+resp+'</pre>';
return FW_okDialog(resp);
}
newDef = newDef.replace(/&/g, '&amp;') // Same as in 01_FHEMWEB
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');