Advertisement
saasbook

jquery_factory.js

Mar 1st, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. describe('element sanitizer', function() {
  2. it('removes IMG tags from evil HTML', function() {
  3. setFixtures(sandbox({class: 'myTestClass'}));
  4. $('.myTestClass').text("Evil HTML! <img src='http://evil.com/xss'>");
  5. $('.myTestClass').sanitize();
  6. expect($('.myTestClass').text()).not.toContain('<img');
  7. });
  8. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement