diff --git a/src/transformers/sanitize.test.ts b/src/transformers/sanitize.test.ts index 8de3b07..12db7d6 100644 --- a/src/transformers/sanitize.test.ts +++ b/src/transformers/sanitize.test.ts @@ -1,3 +1,4 @@ +import { stripIndent } from 'common-tags' import { describe, expect, test } from 'vitest' import { sanitizeHTML } from './sanitize' @@ -18,6 +19,25 @@ describe('Sanitization: custom', () => { 'pp', ) }) + + test('allow max two empty paragraphys', () => { + expectSanitizeHTML( + '

abc

abc

', + stripIndent` +

abc

+

+

+

+

abc

+

+

+

+

+

+

+ `, + ) + }) }) // via https://github.com/leizongmin/js-xss/blob/master/test/test_xss.js