Decode html tags in log. fix #386

This commit is contained in:
Ruud
2012-05-31 20:11:34 +02:00
parent 95e5282e2c
commit 4bd2ba2b8d
+5 -1
View File
@@ -45,7 +45,7 @@ Page.Log = new Class({
new Fx.Scroll(window, {'duration': 0}).toBottom();
var nav = new Element('ul.nav').inject(self.log, 'top');
for (var i = 0; i < json.total; i++) {
for (var i = 0; i <= json.total; i++) {
new Element('li', {
'text': i+1,
'class': nr == i ? 'active': '',
@@ -78,6 +78,10 @@ Page.Log = new Class({
addColors: function(text){
var self = this;
var text = new Element('div', {
'html': text
}).get('text')
text = text.replace(/\u001b\[31m/gi, '</span><span class="error">')
text = text.replace(/\u001b\[36m/gi, '</span><span class="debug">')
text = text.replace(/\u001b\[33m/gi, '</span><span class="debug">')