Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airmail macOS interprets code in conditional comments #138

Open
hteumeuleu opened this issue Apr 15, 2024 · 4 comments
Open

Airmail macOS interprets code in conditional comments #138

hteumeuleu opened this issue Apr 15, 2024 · 4 comments
Labels
Other clients Samsung, SFR, Orange, T-Online, Onet, …

Comments

@hteumeuleu
Copy link
Owner

The Airmail App version 5.7.2 on macOS 14.2.1 interprets code in conditional comments. Here’s a code example:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Airmail Conditional Comments Bug</title>
	<!--[if mso]>
	<style type="text/css">
		table { background:red; }
	</style>
	<![endif]-->
</head>
<body>
	<table border="1" cellpadding="1" cellspacing="1">
		<tr>
			<td width="100" height="100">
				Lorem ipsum dolor sit amet, consectetur adipisicing elit.
			</td>
		</tr>
	</table>
	<!--[if mso]>
	<table border="1" cellpadding="1" cellspacing="1">
		<tr>
			<td width="100" height="100">
				Lorem ipsum dolor sit amet, consectetur adipisicing elit.
			</td>
		</tr>
	</table>
	<![endif]-->
</body>
</html>

And here's how it looks in Airmail:

Capture d’écran 2024-04-15 à 13 53 24

@hteumeuleu hteumeuleu added the Other clients Samsung, SFR, Orange, T-Online, Onet, … label Apr 15, 2024
@husseinalhammad
Copy link

Does this affect all HTML comments?

@hteumeuleu
Copy link
Owner Author

No, only conditional comments. Even stuff like <!--[if foobar]> sees its content visible in Airmail.

@husseinalhammad
Copy link

Potentially the intent is to strip all HTML comments (and the contents inside), but they are incorrectly parsing comments. Similar to the Yahoo and GANGA bug:
#95

I don't have access to Airmail macOS currently, but I think it's worth testing something like this:

<!--
  some comment -> is this part visible on Airmail macOS?
-->

@hteumeuleu
Copy link
Owner Author

I did test that, and the content is not visible. To me, this is very reminiscent of the T-Online bug with conditional comments. In fact, I used a template I made for that bug back then and here’s the result:

Screenshot of an email inside Airmail showing conditional comments interpreted

Here's the code:

<!-- <p>This is an HTML comment.</p> -->
<!--[if mso]>
<p>This is a mso conditional comment.</p>
<![endif]-->
<!--[if foobar]>
<p>This is a foobar conditional comment.</p>
<![endif]-->

<hr />

<!--[if !mso]><!-->
<p>This is everything but The Outlooks.</p>
<!--<![endif]-->

<!--[if true]>
<table align="center" border="1" cellpadding="1" cellspacing="1" style="width:600px;">
	<tr>
		<td>
<![endif]-->
<!--[if false]></td></tr></table><![endif]-->
<div style="max-width:600px; margin:auto;">
	This is the content.
</div>
<!--[if false]><table><tr><td><![endif]-->
<!--[if mso]>
		</td>
	</tr>
</table>
<![endif]-->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Other clients Samsung, SFR, Orange, T-Online, Onet, …
Projects
None yet
Development

No branches or pull requests

2 participants