diff --git a/editormd.js b/editormd.js
index c33c097a..33a630c9 100644
--- a/editormd.js
+++ b/editormd.js
@@ -3577,8 +3577,8 @@
markdownToC.push(toc);
var headingHTML = "";
-
- headingHTML += "";
+ var href = $('' + text + '').text();
+ headingHTML += "";
headingHTML += "";
headingHTML += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text));
headingHTML += "";
@@ -3704,8 +3704,8 @@
{
html += "";
}
-
- html += "
" + text + "";
+ var href = $('' + text + '').text();
+ html += "- " + text + "