import { sanitizeHtmlContent } from 'stream-markdown-parser' import { describe, expect, it } from 'vitest' describe('sanitizeHtmlContent', () => { it('removes dangerous attrs, unsafe urls, and blocked tags', () => { const html = sanitizeHtmlContent('
Hello Link
') expect(html).toContain('
Hello Link
') expect(html).not.toContain('onclick') expect(html).not.toContain('onerror') expect(html).not.toContain('javascript:') expect(html).not.toContain(' { const html = sanitizeHtmlContent('Hello world !') expect(html).toBe('Hello world !') }) })