Fixes Issue #350 -- Making _.escape dumber to allow double-escaping of HTML entities.

This commit is contained in:
Jeremy Ashkenas
2011-10-31 12:31:02 -04:00
parent 64b69c0cfa
commit ba96d168ec
2 changed files with 6 additions and 1 deletions

View File

@@ -41,6 +41,11 @@ $(document).ready(function() {
equals(_('champ').myReverse(), 'pmahc', 'mixed in a function to the OOP wrapper');
});
test("utility: _.escape", function() {
equals(_.escape("Curly & Moe"), "Curly & Moe");
equals(_.escape("Curly & Moe"), "Curly & Moe");
});
test("utility: template", function() {
var basicTemplate = _.template("<%= thing %> is gettin' on my noives!");
var result = basicTemplate({thing : 'This'});