Fixes for html entities in subject

This commit is contained in:
David Bomba 2023-03-17 19:41:38 +11:00
parent ab2362e874
commit dc2353db04
4 changed files with 16 additions and 2 deletions

View File

@ -388,6 +388,13 @@ class PaymentEmailEngine extends BaseEmailEngine
*/ */
private function buildViewButton(string $link, string $text): string private function buildViewButton(string $link, string $text): string
{ {
if ($this->settings->email_style == 'plain') {
return '<a href="'. $link .'" target="_blank">'. $text .'</a>';
}
return ' return '
<div> <div>
<!--[if (gte mso 9)|(IE)]> <!--[if (gte mso 9)|(IE)]>

View File

@ -116,7 +116,7 @@ class TemplateEmail extends Mailable
}//remove whitespace if any has been inserted. }//remove whitespace if any has been inserted.
} }
$this->subject($this->build_email->getSubject()) $this->subject(str_replace("<br>", "", $this->build_email->getSubject()))
->text('email.template.text', [ ->text('email.template.text', [
'text_body' => $this->build_email->getTextBody(), 'text_body' => $this->build_email->getTextBody(),
'whitelabel' => $this->client->user->account->isPaid() ? true : false, 'whitelabel' => $this->client->user->account->isPaid() ? true : false,

View File

@ -41,7 +41,7 @@ class EmailMailable extends Mailable
public function envelope() public function envelope()
{ {
return new Envelope( return new Envelope(
subject: $this->email_object->subject, subject: str_replace("<br>","",$this->email_object->subject),
tags: [$this->email_object->company_key], tags: [$this->email_object->company_key],
replyTo: $this->email_object->reply_to, replyTo: $this->email_object->reply_to,
from: $this->email_object->from, from: $this->email_object->from,

View File

@ -808,6 +808,13 @@ html {
*/ */
private function buildViewButton(string $link, string $text): string private function buildViewButton(string $link, string $text): string
{ {
if ($this->settings->email_style == 'plain') {
return '<a href="'. $link .'" target="_blank">'. $text .'</a>';
}
return ' return '
<div> <div>
<!--[if (gte mso 9)|(IE)]> <!--[if (gte mso 9)|(IE)]>