frontend/Utils: oh god undo this

This commit is contained in:
Cadey Ratio 2016-12-14 21:16:44 -08:00
parent dc58e7dc5b
commit 7c4d531493
1 changed files with 1 additions and 5 deletions

View File

@ -1,13 +1,9 @@
// Module App.BlogEntry // Module App.BlogEntry
function htmlDecode(value){
return $('<div/>').html(value).text();
}
exports.mdify = function(id) { exports.mdify = function(id) {
var converter = new showdown.Converter() var converter = new showdown.Converter()
elem = document.getElementById(id); elem = document.getElementById(id);
md = elem.innerHTML; md = elem.innerHTML;
elem.innerHTML = htmlDecode(converter.makeHtml(md)); elem.innerHTML = converter.makeHtml(md);
return "done :)"; return "done :)";
} }