diff --git a/www/pgm2/console.js b/www/pgm2/console.js index 2bdfd7617..636ac0d4a 100644 --- a/www/pgm2/console.js +++ b/www/pgm2/console.js @@ -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>)/g, + var rTab = {'<':'<', '>':'>',' ':' ', '\n':'
' }; + new_content = new_content.replace( + /(
)([\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 ""; });