From 67ed722e026f767a196b6f24652acb7057099c80 2014-06-03 21:04:56 From: Jonathan Frederic Date: 2014-06-03 21:04:56 Subject: [PATCH] Fixed mardown rendering bug. The wrong signature of `$()` was being used wrong: http://api.jquery.com/jQuery/#jQuery1 right: http://api.jquery.com/jQuery/#jQuery2 Instead of implictly calling parseHTML, call it explicitly. closes #5943 --- diff --git a/IPython/html/static/notebook/js/textcell.js b/IPython/html/static/notebook/js/textcell.js index 9b7724a..f68412d 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);