diff --git a/mustache.js b/mustache.js index 18706aecb..cad9ebb0a 100644 --- a/mustache.js +++ b/mustache.js @@ -63,11 +63,13 @@ '>': '>', '"': '"', "'": ''', - '/': '/' + '/': '/', + '`': '`', + '=': '=' }; function escapeHtml (string) { - return String(string).replace(/[&<>"'\/]/g, function fromEntityMap (s) { + return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) { return entityMap[s]; }); } diff --git a/test/_files/escaped.js b/test/_files/escaped.js index cd77c1f49..e60095960 100644 --- a/test/_files/escaped.js +++ b/test/_files/escaped.js @@ -2,5 +2,5 @@ title: function () { return "Bear > Shark"; }, - entities: "" \"'<>/" + entities: "" \"'<>`=/" }) diff --git a/test/_files/escaped.txt b/test/_files/escaped.txt index c1527d510..182f99ee4 100644 --- a/test/_files/escaped.txt +++ b/test/_files/escaped.txt @@ -1,2 +1,2 @@