Added stripping of html from markdown

This commit is contained in:
Rashid Khan
2013-03-05 15:38:25 -07:00
parent c586cbf3d6
commit 3eb9c5ded0
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -24,7 +24,10 @@ angular.module('kibana.text', [])
var scripts = $LAB.script("panels/text/lib/showdown.js")
scripts.wait(function(){
var converter = new Showdown.converter();
var htmlText = converter.makeHtml(scope.panel.content);
var text = scope.panel.content.replace(/&/g, '&')
.replace(/>/g, '>')
.replace(/</g, '&lt;');
var htmlText = converter.makeHtml(text);
element.html(htmlText);
});
}