diff --git a/lib/marked.js b/lib/marked.js index 089369f003..0702728833 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -1095,7 +1095,7 @@ function escape(html, encode) { function unescape(html) { // explicitly match decimal, hex, and named HTML entities - return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(\w+))/g, function(_, n) { + return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { n = n.toLowerCase(); if (n === 'colon') return ':'; if (n.charAt(0) === '#') {