Projet

Général

Profil

Bug #50701

texte de bouton détecté comme invisible par spamassassin

Ajouté par Frédéric Péters il y a plus de 3 ans. Mis à jour il y a environ 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
30 janvier 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

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

Révision d3e73686 (diff)
Ajouté par Frédéric Péters il y a plus de 3 ans

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.

Historique

#1

Mis à jour par Frédéric Péters il y a plus de 3 ans

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.

#2

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…

#3

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.
#4

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

Formats disponibles : Atom PDF