Gmail (or something) is changing my class names?

后端 未结 3 1024
抹茶落季
抹茶落季 2021-01-19 14:29

Ok, this is weird. I have an HTML email template that I am trying to adjust. In the template, I have a standard

    . But, the client has requested tha
3条回答
  •  有刺的猬
    2021-01-19 14:58

    To expand on the answer from @gwally, I believe the REASON Gmail does this is to avoid your email from affecting the outer DOM elements of Gmail itself. If you could do this, you could effectively craft a malicious email to steal information from users with some clever CSS trickery, or 'redress' Gmail's appearance to launch some pretty nasty phishing attacks. The limitation of CSS properties is likely also as much of a security decision as a UI/UX one.

    Out of curiosity, i just spent an hour fuzzing class names in emails to myself, in an attempt to bypass this mechanism. It doesn't seem possible, although I wouldn't claim any solution is bulletproof.

提交回复
热议问题