mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
console.js: fix multiline FHEM-Log (Forum #122316)
git-svn-id: https://svn.fhem.de/fhem/trunk@24820 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ae01388c1b
commit
d0cfb6c3be
@ -67,10 +67,13 @@ consUpdate(evt)
|
||||
|
||||
// Extract the FHEM-Log, to avoid escaping its formatting (Forum #104842)
|
||||
var logContent = "";
|
||||
var rTab = {'<':'<', '>':'>',' ':' '};
|
||||
new_content = new_content.replace(/(<div class='fhemlog'>)(.*?)(<\/div>)/g,
|
||||
var rTab = {'<':'<', '>':'>',' ':' ', '\n':'<br>' };
|
||||
new_content = new_content.replace(
|
||||
/(<div class='fhemlog'>)([\s\S]*?)(<\/div>)/gm,
|
||||
function(all, div1, msg, div2) {
|
||||
logContent += div1+msg.replace(/[<> ]/g, function(a){return rTab[a]})+div2;
|
||||
logContent += div1+
|
||||
msg.replace(/[<> \n]/g, function(a){return rTab[a]})+
|
||||
div2;
|
||||
return "";
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user