1 import { restrictedCalendarSanitize } from '../../lib/calendar/sanitize';
3 describe('sanitize description', () => {
4 it('should drop disallowed tags', () => {
6 restrictedCalendarSanitize(
7 `<div><img src="https://protonmail.com" alt="test"/></span><a href="https://protonmail.com">protonmail</a></div>`
9 ).toEqual(`<a href="https://protonmail.com" rel="noopener noreferrer" target="_blank">protonmail</a>`);
12 it('should drop disallowed attributes', () => {
13 expect(restrictedCalendarSanitize(`<span style="font-family: sans-serif">text</span>`)).toEqual(