Handle \u2028 & \u2029 in _.template.

This commit is contained in:
Brad Dunbar
2012-03-12 19:15:18 -04:00
parent 144dcb1828
commit 826e743262
2 changed files with 10 additions and 1 deletions

View File

@@ -160,4 +160,9 @@ $(document).ready(function() {
equal(templateWithNull({planet : "world"}), "a null undefined world", "can handle missing escape and evaluate settings");
});
test('_.template handles \\u2028 & \\u2029', function() {
var tmpl = _.template('<p>\u2028<%= "\\u2028\\u2029" %>\u2029</p>');
strictEqual(tmpl(), '<p>\u2028\u2028\u2029\u2029</p>');
});
});