diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js
index 90100b2db..ae2b77f5b 100644
--- a/IPython/frontend/html/notebook/static/js/textcell.js
+++ b/IPython/frontend/html/notebook/static/js/textcell.js
@@ -517,12 +517,12 @@ var IPython = (function (IPython) {
var r = this.element.find("div.text_cell_render");
r.empty();
r.append(
- $('')
- .addClass('heading-link')
- .attr('href', '#' + text)
- .attr('name', text)
+ $('')
.append(
- $('')
+ $('')
+ .addClass('heading-link')
+ .attr('href', '#' + text)
+ .attr('name', text)
.html(text)
)
);