mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
9466a9753b
commit
c732cd2ccb
1 changed files with 9 additions and 0 deletions
|
@ -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': "</title></head><body><script>alert('blogtitle');</script>"}).save();
|
||||
}).then(function (saved) {
|
||||
saved.get('title').should.eql("</title></head><body>[removed]alert('blogtitle');[removed]");
|
||||
done();
|
||||
}).otherwise(done);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue