diff --git a/IPython/html/static/notebook/js/textcell.js b/IPython/html/static/notebook/js/textcell.js index 78a56da..0db7af8 100644 --- a/IPython/html/static/notebook/js/textcell.js +++ b/IPython/html/static/notebook/js/textcell.js @@ -256,7 +256,7 @@ var IPython = (function (IPython) { var html = marked.parser(marked.lexer(text)); html = IPython.mathjaxutils.replace_math(html, math); html = security.sanitize_html(html); - html = $(html); + html = $($.parseHTML(html)); // links in markdown cells should open in new tabs html.find("a[href]").not('[href^="#"]').attr("target", "_blank"); this.set_rendered(html); @@ -428,7 +428,7 @@ var IPython = (function (IPython) { var html = marked.parser(marked.lexer(text)); html = IPython.mathjaxutils.replace_math(html, math); html = security.sanitize_html(html); - var h = $(html); + var h = $($.parseHTML(html)); // add id and linkback anchor var hash = h.text().replace(/ /g, '-'); h.attr('id', hash); diff --git a/IPython/html/tests/notebook/markdown.js b/IPython/html/tests/notebook/markdown.js index b65a076..0c1f61e 100644 --- a/IPython/html/tests/notebook/markdown.js +++ b/IPython/html/tests/notebook/markdown.js @@ -10,7 +10,7 @@ casper.notebook_test(function () { cell.render(); return cell.get_rendered(); }); - this.test.assertEquals(output, '