Bug #50701
texte de bouton détecté comme invisible par spamassassin
0%
Description
Un lien dans un mail pour finaliser l'inscription va avoir cette forme :
<td style="border-radius: 3px; background: #7D7D7D; text-align: center;" class="button-td"> <a href="https://.../accounts/activate/zErF_YUdQmiZa2ZI7pJLqw/" style="background: #7D7D7D; border: 15px solid #7D7D7D; font-family: sans-serif; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a"> <span style="color:#ffffff;" class="button-link">Finaliser l’inscription</span> </a> </td>
et ça déclenche HTML_FONT_LOW_CONTRAST BODY (« Police HTML de la même couleur que le fond ») dans les tests de spamassassin.
(ce test est chez nous avec un score de 0 mais sait-on jamais ailleurs)
C'est en soit un bug dans spamassassin qui à un moment fait ça :
if (/^\s*(background-)?color:\s*(.+?)\s*$/i) {
et passe ainsi à côté de la valeur définie via la propriété background.
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Fichier 0001-templates-add-explicit-background-color-style-to-ema.patch 0001-templates-add-explicit-background-color-style-to-ema.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Voilà avec la propriété doublée; je le note dans le message de commit : j'ai gardé la propriété background à côté parce que je ne sais trop quels bugs se cachent dans les clients mails et j'en imagine bien un qui comprendrait background mais pas background-color.
Mis à jour par Thomas Jund il y a plus de 3 ans
- Statut changé de Solution proposée à Solution validée
D'après https://www.caniemail.com/search/?s=background
`background-color` a un meilleur support que `background`, mais en effet, avec les clients mail…
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit d3e7368662d91caaf740ec10c5f5147b29e33dbd Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sat Jan 30 17:03:46 2021 +0100 templates: add explicit background-color style to email buttons (#50701) This avoids triggering SpamAssassin low contrast check; the shortcut background property is kept as some email readers may have alternate bugs and not consider background-color.
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
templates: add explicit background-color style to email buttons (#50701)
This avoids triggering SpamAssassin low contrast check; the shortcut
background property is kept as some email readers may have alternate
bugs and not consider background-color.