Skip to content

Commit

Permalink
Replace the special characters in site name for mail templates (jooml…
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo authored Sep 4, 2023
1 parent 3bb67d5 commit 50cf1e3
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1199,9 +1199,8 @@ public function sendTestMail()
$mailer = new MailTemplate('com_config.test_mail', $user->getParam('language', $app->get('language')), $mail);
$mailer->addTemplateData(
[
// Replace the occurrences of "@" and "|" in the site name in order to send the test mail, as these
// characters produce an error else wise: https://github.com/joomla/joomla-cms/issues/41061
'sitename' => preg_filter(['/@/', '/\|/'], '', $app->get('sitename'), -1),
// Replace the occurrences of "@" and "|" in the site name
'sitename' => str_replace(['@', '|'], '', $app->get('sitename')),
'method' => Text::_('COM_CONFIG_SENDMAIL_METHOD_' . strtoupper($mail->Mailer)),
]
);
Expand Down

0 comments on commit 50cf1e3

Please sign in to comment.