fhemweb.js: fix multiline <html> matching (Forum #98419)

git-svn-id: https://svn.fhem.de/fhem/trunk@18896 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2019-03-14 13:10:11 +00:00
parent 1f5314a442
commit 9d71d23179

View File

@@ -201,7 +201,7 @@ FW_jqueryReadyFn()
// make get use xhr instead of reload
//return true;
FW_cmd(FW_root+"?cmd="+encodeURIComponent(val)+"&XHR=1", function(data){
if( !data.match( /^<html>.*<\/html>/ ) ) {
if( !data.match( /^<html>[\s\S]*<\/html>/ ) ) {
data = data.replace( '<', '&lt;' );
data = '<pre>'+data+'</pre>';
}