Skip to content

Commit 50cf1e3

Browse files
authored
Replace the special characters in site name for mail templates (#41582)
1 parent 3bb67d5 commit 50cf1e3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

administrator/components/com_config/src/Model/ApplicationModel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,9 +1199,8 @@ public function sendTestMail()
11991199
$mailer = new MailTemplate('com_config.test_mail', $user->getParam('language', $app->get('language')), $mail);
12001200
$mailer->addTemplateData(
12011201
[
1202-
// Replace the occurrences of "@" and "|" in the site name in order to send the test mail, as these
1203-
// characters produce an error else wise: https://github.com/joomla/joomla-cms/issues/41061
1204-
'sitename' => preg_filter(['/@/', '/\|/'], '', $app->get('sitename'), -1),
1202+
// Replace the occurrences of "@" and "|" in the site name
1203+
'sitename' => str_replace(['@', '|'], '', $app->get('sitename')),
12051204
'method' => Text::_('COM_CONFIG_SENDMAIL_METHOD_' . strtoupper($mail->Mailer)),
12061205
]
12071206
);

0 commit comments

Comments
 (0)