var sanitize = require('../../../src/core/sanitize'); describe('core/sanitize', function () { describe('.html', function () { describe('when given a HTML', function () { it('should allow safe HTML', function () { expect(sanitize.html('test')).toEqual('test'); expect(sanitize.html('
works
')).toEqual('
works
'); }); it('should remove unsafe stuff', function () { expect(sanitize.html(' nono')).toEqual(' nono'); expect(sanitize.html('nono ')).toEqual('nono '); }); it('should allow target attributes for links', function () { expect(sanitize.html('carto.com')).toEqual('carto.com'); }); it('should remove iframe tag', function () { expect(sanitize.html('no