diff --git a/core/shared/lib/showdown/extensions/ghostfootnotes.js b/core/shared/lib/showdown/extensions/ghostfootnotes.js
index f99bd8a992..28a4a083de 100644
--- a/core/shared/lib/showdown/extensions/ghostfootnotes.js
+++ b/core/shared/lib/showdown/extensions/ghostfootnotes.js
@@ -32,7 +32,7 @@ function replaceInlineFootnotes(text) {
});
}
-function replaceEndFootnotes(text) {
+function replaceEndFootnotes(text, converter) {
// Expanded footnotes at the end e.g. "[^1]: cool stuff"
var endRegex = /\[\^(\d|n)\]: ([\s\S]*?)$(?! )/gim,
m = text.match(endRegex),
@@ -45,12 +45,12 @@ function replaceEndFootnotes(text) {
}
content = content.replace(/\n /g, '
');
-
+ content = converter.makeHtml(content);
+ content = content.replace(/<\/p>$/, '');
var s = '
' + content + ' ↩' + - '
' + - '