diff --git a/mustache.js b/mustache.js index 28bed23..6259024 100644 --- a/mustache.js +++ b/mustache.js @@ -44,7 +44,7 @@ var Mustache = function () { }; function escapeHTML(string) { - return String(string).replace(/&(?!\w+;)|[<>"']/g, function (s) { + return String(string).replace(/&(?!#?\w+;)|[<>"']/g, function (s) { return escapeMap[s] || s; }); }