cleanup
This commit is contained in:
parent
9f6c762c18
commit
7097c008e2
|
@ -215,35 +215,30 @@ $purifier = new HTMLPurifier($purifier_config);
|
|||
?>
|
||||
|
||||
<div class="mt-2 card-text">
|
||||
<div>
|
||||
<?php
|
||||
$safeHtml = $purifier->purify($email->textHtml);
|
||||
<?php
|
||||
$safeHtml = $purifier->purify($email->textHtml);
|
||||
|
||||
$safeText = $purifier->purify($email->textPlain);
|
||||
$safeText = nl2br($safeText);
|
||||
$safeText = \AutoLinkExtension::auto_link_text($safeText);
|
||||
$safeText = $purifier->purify($email->textPlain);
|
||||
$safeText = nl2br($safeText);
|
||||
$safeText = \AutoLinkExtension::auto_link_text($safeText);
|
||||
|
||||
$hasHtml = strlen(trim($safeHtml)) > 0;
|
||||
$hasText = strlen(trim($safeText)) > 0;
|
||||
$hasHtml = strlen(trim($safeHtml)) > 0;
|
||||
$hasText = strlen(trim($safeText)) > 0;
|
||||
|
||||
if ($config['prefer_plaintext']) {
|
||||
if ($hasText) {
|
||||
echo $safeText;
|
||||
} else {
|
||||
echo $safeHtml;
|
||||
}
|
||||
if ($config['prefer_plaintext']) {
|
||||
if ($hasText) {
|
||||
echo $safeText;
|
||||
} else {
|
||||
if ($hasHtml) {
|
||||
echo $safeHtml;
|
||||
} else {
|
||||
echo $safeText;
|
||||
}
|
||||
echo $safeHtml;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<?php ?>
|
||||
</div>
|
||||
} else {
|
||||
if ($hasHtml) {
|
||||
echo $safeHtml;
|
||||
} else {
|
||||
echo $safeText;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user