diff --git a/packages/handlebars/evaluate.js b/packages/handlebars/evaluate.js index 736bb6b542..8119366c41 100644 --- a/packages/handlebars/evaluate.js +++ b/packages/handlebars/evaluate.js @@ -70,10 +70,7 @@ Handlebars._escape = (function() { }; return function (x) { - // If Handlebars sees an &entity; in the input text, it won't quote - // it (won't replace it with &entity;). I'm not sure if that's - // the right choice -- it's definitely a heuristic.. - return x.replace(/&(?!\w+;)|[<>"'`]/g, escape_one); + return x.replace(/[&<>"'`]/g, escape_one); }; })();