This commit is contained in:
mchev
2026-04-01 21:30:32 +02:00
parent 7004bf375e
commit aa88dc340d
8 changed files with 21 additions and 9 deletions

View File

@@ -25,3 +25,12 @@ it('strips style and link attributes that may carry URLs', function () {
it('returns empty string for empty input', function () {
expect(PdfHtmlSanitizer::sanitize(''))->toBe('');
});
it('normalizes legacy closing-br markup so lines are not collapsed in PDF output', function () {
$html = 'line1</br>line2';
$out = PdfHtmlSanitizer::sanitize($html);
expect($out)->toContain('<br')->toContain('line1')->toContain('line2');
expect($out)->not->toBe('line1line2');
});