JSonp newline patch from Joerg
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2140 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -509,6 +509,8 @@ FW_answerCall($)
|
||||
$FW_RETTYPE = "text/plain; charset=$FW_encoding";
|
||||
if($FW_jsonp) {
|
||||
$FW_cmdret =~ s/'/\\'/g;
|
||||
# Escape newlines in JavaScript string
|
||||
$FW_cmdret =~ s/\n/\\\n/g;
|
||||
FW_pO "$FW_jsonp('$FW_cmdret');";
|
||||
} else {
|
||||
FW_pO $FW_cmdret;
|
||||
|
||||
Reference in New Issue
Block a user