diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js index fee6a44..f16a7f5 100644 --- a/IPython/frontend/html/notebook/static/js/textcell.js +++ b/IPython/frontend/html/notebook/static/js/textcell.js @@ -516,13 +516,14 @@ var IPython = (function (IPython) { HeadingCell.prototype.set_rendered = function (text) { var r = this.element.find("div.text_cell_render"); r.empty(); + var link = text.replace(/ /g, '_'); r.append( $('') .append( $('') .addClass('heading-anchor') - .attr('href', '#' + text) - .attr('name', text) + .attr('href', '#' + link) + .attr('id', link) .html(text) ) );