diff options
-rw-r--r-- | lib/handlebars/utils.js | 7 | ||||
-rw-r--r-- | spec/utils.js | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/handlebars/utils.js b/lib/handlebars/utils.js index 81050f9..d34646b 100644 --- a/lib/handlebars/utils.js +++ b/lib/handlebars/utils.js @@ -4,11 +4,12 @@ const escape = { '>': '>', '"': '"', "'": ''', - '`': '`' + '`': '`', + '=': '=' }; -const badChars = /[&<>"'`]/g, - possible = /[&<>"'`]/; +const badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; function escapeChar(chr) { return escape[chr]; diff --git a/spec/utils.js b/spec/utils.js index 81732c5..7248ac4 100644 --- a/spec/utils.js +++ b/spec/utils.js @@ -18,6 +18,7 @@ describe('utils', function() { describe('#escapeExpression', function() { it('shouhld escape html', function() { equals(Handlebars.Utils.escapeExpression('foo<&"\'>'), 'foo<&"'>'); + equals(Handlebars.Utils.escapeExpression('foo='), 'foo='); }); it('should not escape SafeString', function() { var string = new Handlebars.SafeString('foo<&"\'>'); |