mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
console.js: Fix for DOIFtools (Forum #102773)
git-svn-id: https://svn.fhem.de/fhem/trunk@19946 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b118af93dc
commit
539503797f
@ -62,8 +62,9 @@ consUpdate(evt)
|
|||||||
log("Console Rcvd: "+new_content);
|
log("Console Rcvd: "+new_content);
|
||||||
// replace space with nbsp to preserve formatting
|
// replace space with nbsp to preserve formatting
|
||||||
var rTab = {'<':'<', '>':'>',' ':' '};
|
var rTab = {'<':'<', '>':'>',' ':' '};
|
||||||
|
var isTa = $("#console").is("textarea"); # 102773
|
||||||
new_content = new_content.replace(/(.*)<br>[\r\n]/g, function(all,p1) {
|
new_content = new_content.replace(/(.*)<br>[\r\n]/g, function(all,p1) {
|
||||||
return p1.replace(/[<> ]/g, function(a){return rTab[a]})+"<br>";
|
return p1.replace(/[<> ]/g, function(a){return rTab[a]})+(isTa ? "\n" : "<br>");
|
||||||
});
|
});
|
||||||
$("#console").append(new_content);
|
$("#console").append(new_content);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user