Skip to content
Snippets Groups Projects
Commit 516311e7 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Enabling line breaks in template texts

parent 83eecf88
No related branches found
No related tags found
No related merge requests found
......@@ -112,17 +112,23 @@ class MailController extends ActionController {
$this->view->assign('selectedExtensionKey', $selectedExtensionKey);
$this->view->assign(
'contentLeft', file_get_contents($templatePath . $selectedLanguageLeft . '.sg_mail.locallang.html')
'contentLeft',
strip_tags(file_get_contents($templatePath . $selectedLanguageLeft . '.sg_mail.locallang.html'))
);
$this->view->assign(
'contentRight', file_get_contents($templatePath . $selectedLanguageRight . '.sg_mail.locallang.html')
'contentRight',
strip_tags(file_get_contents($templatePath . $selectedLanguageRight . '.sg_mail.locallang.html'))
);
} else {
$this->view->assign('selectedLanguageLeft', 'en');
$this->view->assign('contentLeft', file_get_contents($templatePath . 'en.sg_mail.locallang.html'));
$this->view->assign(
'contentLeft', strip_tags(file_get_contents($templatePath . 'en.sg_mail.locallang.html'))
);
$this->view->assign('selectedLanguageRight', 'en');
$this->view->assign('contentRight', file_get_contents($templatePath . 'en.sg_mail.locallang.html'));
$this->view->assign(
'contentRight', strip_tags(file_get_contents($templatePath . 'en.sg_mail.locallang.html'))
);
}
}
......@@ -163,10 +169,10 @@ class MailController extends ActionController {
$templatePath = $this->getTemplatePath($selectedExtension, $selectedTemplate);
$filename = $templatePath . $selectedLanguageLeft . '.sg_mail.locallang.html';
file_put_contents($filename, $contentLeft);
file_put_contents($filename, '<f:format.nl2br>' . strip_tags($contentLeft) . '</f:format.nl2br>');
$filename = $templatePath . $selectedLanguageRight . '.sg_mail.locallang.html';
file_put_contents($filename, $contentRight);
file_put_contents($filename, '<f:format.nl2br>' . strip_tags($contentRight) . '</f:format.nl2br>');
$message = LocalizationUtility::translate('backend.success', 'sg_mail');
$this->addFlashMessage($message, '', FlashMessage::OK);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment