discourse/test/javascripts/helpers/parse_html.js

7 lines
218 B
JavaScript
Raw Normal View History

function parseHTML(rawHtml) {
var builder = new Tautologistics.NodeHtmlParser.HtmlBuilder(),
parser = new Tautologistics.NodeHtmlParser.Parser(builder);
parser.parseComplete(rawHtml);
return builder.dom;
}