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

@@ -19,6 +19,9 @@ final class PdfHtmlSanitizer
return '';
}
// Legacy/invalid `</br>` is dropped by libxml and collapses lines in PDF output; normalize to `<br />`.
$html = str_replace('</br>', '<br />', $html);
$allowedTags = '<br><br/><p><b><strong><i><em><u><ol><ul><li><table><tr><td><th><thead><tbody><tfoot><h1><h2><h3><h4><blockquote>';
$html = strip_tags($html, $allowedTags);