Open husseinalhammad opened 3 years ago
Oh wow this is really cool so we can use conditional comments for Yahoo and GANGA
<!--Yahoo->
<p style="background:red;color:white;font-size:50px;">You are using Yahoo or AOL</p>
<!yahoo-->
<!--Yahoo-GANGA->
<p style="background:green;color:white;font-size:50px;">You are using Yahoo, AOL or GANGA</p>
<!yahoo-GANGA-->
(the -
between Yahoo and GANGA here is what's making it work).
<!--GANGA->
<div style="display:none"> ->
<p style="background:green;color:white;font-size:50px;">GANGA</p>
<!GANGA--><!--</div><! -->
@M-J-Robbins I was annoyed when I ran into this, but I like how you turned this into "we can now use this to target these clients"!
Your discovery allows me to swap image even for yahoo-Ganga, which is a little revolution for me !! haha..https://codepen.io/matthieuSolente/pen/vYmKyZe thanks guys !!
I initially ran into this on Yahoo (web and Android), but upon further testing I found a similar behaviour on Gmail Android with a non-Gmail account.
Both Yahoo and Gmail attempt to remove HTML comments. However, Yahoo partially removes HTML comments if
->
(single dash) is within the comment, while GANGA (Android) partially removes HTML comments if 2 occurrences of->
is within the comment. This happens even if the HTML comment is technically valid.HTML comments syntax
https://html.spec.whatwg.org/multipage/syntax.html#comments
Yahoo
The following is a valid HTML comment, however Yahoo assumes it ends at
->
:GANGA
The following is also a valid HTML comment, however GANGA (Android at least) assumes it ends at the second
->
: