Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / shared / test / calendar / sanitize.spec.ts
blobec4956e82f03328114c34954171099d2ab448601
1 import { restrictedCalendarSanitize } from '../../lib/calendar/sanitize';
3 describe('sanitize description', () => {
4     it('should drop disallowed tags', () => {
5         expect(
6             restrictedCalendarSanitize(
7                 `<div><img src="https://protonmail.com" alt="test"/></span><a href="https://protonmail.com">protonmail</a></div>`
8             )
9         ).toEqual(`<a href="https://protonmail.com" rel="noopener noreferrer" target="_blank">protonmail</a>`);
10     });
12     it('should drop disallowed attributes', () => {
13         expect(restrictedCalendarSanitize(`<span style="font-family: sans-serif">text</span>`)).toEqual(
14             `<span>text</span>`
15         );
16     });
17 });