Infos:
- Used Zammad version: 5.0
- Used Zammad installation type: package
- Operating system: Ubuntu
- Browser + version: All
We have a client that sends mails from their system that contain html + css.
Their whole message is in a td in a table, and this td has the following style: ‘style="background: #fff; color: #fff;’, and then all the paragraphs have "style=“color: #000000;”’
So a mail from them will look something like:
<table style="max-width: 100%; min-width: 320px; display: block;" width="100%" cellspacing="10px" cellpadding="10px">
<tbody>
<tr>
<td style="background: #FFF; color: #fff;" width="506">
<p style="line-height: 140%; font-size: 20px; font-family: Helvetica Neue,Arial,sans-serif; padding: 10px 30px 0 30px;"><span style="color: #000000;">TEXT</span></p>
<p style="color: #fff; line-height: 140%; font-size: 12px; font-family: Helvetica Neue,Arial,sans-serif; padding: 00px 30px 0 30px;"><span style="color: #000000;">TEXT </span><br /><br /><span style="color: #000000;">TEXT</span></p>
<p> </p>
</td>
</tr>
</tbody>
</table>
The problem is that Zammad strips all the styles, excepting the styles on the table and td, so the color of the text remains white.
<table cellspacing="10px" cellpadding="10px">
<tbody>
<tr>
<td style="background: #fff; color: #fff;">
<p>TEXT</p>
[...]
</td>
<td></td>
</tr>
</tbody>
<table>
I know that it’s an unusual way of sending mails, but nonetheless, the text should be visibile.
Expected behavior:
- I would expect that either all styles are stripped, or none. By stripping only some styles, the mail contains is unusable. For example, if some “color” styles are kept, all “color” styles should be kept. If a concern is that some styles could modify the page, maybe all styles can be parsed and moved to clases with unique names, and have those classes added only to the original mail so they do not bleed.
Actual behavior:
- The mail cannot be read. It contains only white text. By highlighting it we can see the message.
Steps to reproduce the behavior:
- Receive a mail with the given HTML and it will be a white box :).
What can we do for the moment so we can see the mails from this client?