Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('element sanitizer', function() {
- it('removes IMG tags from evil HTML', function() {
- setFixtures(sandbox({class: 'myTestClass'}));
- $('.myTestClass').text("Evil HTML! <img src='http://evil.com/xss'>");
- $('.myTestClass').sanitize();
- expect($('.myTestClass').text()).not.toContain('<img');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement