Skip to content

Commit

Permalink
Remove Handlebars._escape & heuristic.
Browse files Browse the repository at this point in the history
It made strings like "Escape < as &lt;" unrenderable.
  • Loading branch information
dgreensp committed Jun 5, 2012
1 parent 0dec81f commit 5b0346b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/handlebars/evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 &ampentity;). 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);
};
})();

Expand Down

0 comments on commit 5b0346b

Please sign in to comment.