diff --git a/core/test/unit/model_posts_spec.js b/core/test/unit/model_posts_spec.js index 7e16d0694a..5652fe0bcb 100644 --- a/core/test/unit/model_posts_spec.js +++ b/core/test/unit/model_posts_spec.js @@ -361,4 +361,13 @@ describe('Post Model', function () { done(); }).then(null, done); }); + + it('should santize the title', function (done) { + new PostModel().fetch().then(function (model) { + return model.set({'title': ""}).save(); + }).then(function (saved) { + saved.get('title').should.eql("</title></head><body>[removed]alert('blogtitle');[removed]"); + done(); + }).otherwise(done); + }); });