When viewing or editing the COM_ACTIONLOGS_EMAIL_HTMLBODY
language constant in the Language Override component, the table structure is completely stripped, leaving only newlines. This prevents administrators from being able to view or modify the email template structure.
Original language constant:
COM_ACTIONLOGS_EMAIL_HTMLBODY="<h1>Latest User Actions</h1>\n<h2>This is the latest action performed by a user on your website.</h2>\n<table>\n<thead>\n<th>Action</th>\n<th>Date</th>\n<th>Extension</th>\n<th>Name</th>\n</thead>\n<tbody>\n{MESSAGES}<tr>\n<td>{MESSAGE}</td>\n<td>{DATE}</td>\n<td>{EXTENSION}</td>\n<td>{USERNAME}</td>\n</tr>{/MESSAGES}\n</tbody>\n</table>"
What appears in Language Override editor:
<h1>Latest User Actions</h1>\n<h2>This is the latest action performed by a user on your website.</h2>\n\n\n\n\n\n\n\n\n{MESSAGES}\n\n\n\n\n{/MESSAGES}\n\n
The entire table structure including headers and cells is stripped out, leaving only newlines in their place.
The Language Override editor should:
This appears to be an overly aggressive HTML stripping in the Language Override system. While security is important, stripping HTML from email templates prevents legitimate customization of system emails.
See: #43503
Labels |
Added:
No Code Attached Yet
|
it is not meant to edit the email templates
As the mailtemplate wasn't working I decided to try with language override. So I really don't know where it goes wrong. But even a simple change in mailtemplate ruins everything.
Original mailtemplate
Small change by changing only second line from <h2> to <p>
Result
Don't know if this info helps, but when I change COM_ACTIONLOGS_EMAIL_HTMLBODY in core language file using <div>
in stead of <table>
etc, mail is ok-ish (at least all info is preserved), but wrong layout in Outlook.
Thank you @Pinkeltje for reporting this. While the language override system might be very agressive here, it is not meant to edit the email templates. We have the mail template system for this and the language keys are basically just a concession to backwards compatibility. A special handling for email template language key constants is not possible, (already simply by the fact that we don't know what language key is a mail template) but we do indeed have to check if stripping the HTML is correct here.