github issue comment received via email won't render code block - github

I have a GitHub issue comment here (the third comment down) that I'd like to edit so that it looks prettier, by rendering part of it as a code block.
But it doesn't work; the three backticks show up as literal text.
Anyone know why?

GitHub treats comments received via email differently from comments entered in the web UI. If you look at your comments you'll see that the third one displays an envelope icon beside your name with mouseover text saying, "This comment left via email reply."
In a blog post, GitHub suggests that Markdown formatting is not permitted in email replies:
We figured out early on in testing that we couldn't expect people to write Markdown. People are going to be dumping code or stacktraces, and will expect them to look nicely.
And later, gives this caveat:
Plain text email is vastly preferred. Essentially, we strip all HTML from HTML emails before formatting.
I can't find a better description of how formatting of emailed issue comments is handled, but I don't think you're going to be able to use Markdown if you reply by email.

Related

Links inside email are displayed as double plain text

In our web shop we email customers after each purchase. Up until now all emails displayed properly, but now, in some cases all links inside the email is displayed as doubled plain text. This is happening only to some customers, and I can not find anything about that issue and how to solve it.
Correct Display:
Incorrect Display:
NOTE 1:
I created HTML for that email. The link is wrapped with <a> tag, but when we inspect the incorrectly displayed email, the <a> is removed and only the text is present in the DOM.
NOTE 2:
This is only happening to some customers. We checked and they don't have any ad blocked enabled. Also, this is not browser related issue since they also tried to open email on different browsers.
This happens with Outlook.com and Outlook 365 environments. If the link does not have a http:// or https:// (or other) protocol, it will do this.
Therefore, ensure all your links use a protocol, i.e. ..., and NOT ...
Just in case anyone else winds up here ... we had a similar issue
Our HTML bulk-email (sent programmatically via Exchange) showed formatted correctly in SENT ITEMS, but arrived (when viewed in Outlook) somewhat broken. It was fine if we emailed to e.g. GMail / Hotmail, so probably only a problem with Outlook rendering.
The Outlook presentation was PLAIN TEXT and not Rich / HTML. Noticeable because "View Source" was greyed out. (The content, as sent, definitely had HTML / HEEAD / BODY etc. tags, and it validated OK at W3C - Outlook removed all such HTML tags - seems strange that Outlook decided to display in plain text and then remove all the, correctly coded, HTML tags)
Some, but NOT all, yyy tags displayed wrongly - in particular the tag https://www.example.com/ was what we, eventually, found had caused the email to render (in Outlook) as plain text - all HTML tags stripped and some LINKs rendered wrongly. That HTTPS link did render correctly, but others in the same email which were coded as www.link.com/MyPath rendered as
www.link.com/MyPath<https://www.link.com/MyPath>
same with mailto: links
Removing the HTTPS:// from within the <a href...>HTTPS://xxx</a> tag fixed the problem - took us a while to find though!
So basically it seems that the HREF property should include https:// and the value within the <a> tag should NOT

HTML Email Not Generating Links (A tags) in Outlook

In checking an email that I am coding (a reply-type email that my server will send), I notice that the a tag hyperlinks in my code are not working in Outlook. They work elsewhere, but not Outlook.
I know very little about Microsoft products, but I can tell you that the place I'm seeing this is in the online outlook.com you view in a web browser.
The simplest link, such as this...
Click here
...is coming through like this in the rendered email:
[http:www.yahoo.com]Click here
AND, it is not a link. It's just text. It appears as though the program is disabling the links (possibly because it finds the email suspicious of phishing, even though I added the domain to my trusted emails)???
Anyone know what is happening or how I can work around this?
I don't see anything wrong with the code you've posted, but I do know that Outlook.com will do this to links when it doesn't recognize them as valid links to an external site. Look for hidden characters, "smart" quotes instead of plain quotes, etc. in the link.
You should put the target on the link.
Like this:
Click here

creating a PayPal donation button in an md file

What I'm trying to do is displaying a PayPal donation button into a Github project README.md file. The markup I added is displayed as HTML rather than being properly rendered as donation button.
HTML
// PayPal source here
Do you have any thought?
The current code generated by paypal buttons is based on a FORM html tag with a POST method. Fortunately the values are always the same and paypal is supporting them to be passed by the GET method. So, you can safely read the form code and convert it to a direct link.
On my case I just made a link to my button like this:
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X6XHVCPMRQEL4)
I am using it on my project at http://github.com/ctodobom/OpenNoteScanner
In all likelihood, it is not possible for security reasons (see CSFR and XSS for examples of potentially related security concerns). In other words, GitHub has intentionally not allowed forms within Markdown text and will strip them out if they are included.
For more general information about how to include a form in Markdown (outside of GitHub) see my previous answer below:
As the Markdown syntax rules state:
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.
The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces.
So just insert your raw HTML into the document. You probably should wrap the entire block in a <div> to make sure Markdown treats it properly as one block.
However, be aware that it is possible that GitHub may filter the content to not allow certain tags for security reasons, so you'll need to test it to find out if it will work.
Additionally, depending on how things are configured, the browser and/or the server you are posting to may not allow the form to post for security reasons.
For more on those issues see these questions and related answers.
With Paypal.me , there is no more a security concern :
markdown
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/AbdennourT/10)
markup
<p>
<a href="https://www.paypal.me/AbdennourT/10">
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="paypal">
</a>
</p>
You have to create an enterprise account or you can update your own, it´s free.
Then you have to create the button in the button center and generate a donate button, this tool generates the html and you can get the hoted_button_id then you have to replace it and paste it in the README.md
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YOUR_OWN)
If you want to just use your email and a donate button you can do it by just filling in the blanks from their "donate email" example:
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif)](https://www.paypal.com/donate/?business=paypal#poleguy.com&no_recurring=0&item_name=Payment+for+Stackoverflow+Example&item_number=Suggested+Price:+$7.99+USD&currency_code=USD)
It renders like this:
Paypal warns that it's "not secure" and you should always use a "hosted email payment link to prevent malicious users from tampering with the code." So maybe okay on github, but not on a wiki or stackoverflow where the link could be edited to pay someone else.

URL encoding issue in email campaigns

BACKGROUND:
Sitefinity CMS for my specific problem, but could be general too.
I have an email message which has an unsubscribe link in it like this:
To Unsubscribe: Click or copy paste the following link in your browser.
https://www.domain.com/unsubscribe?mailingList={|MailingList.Title|}&SubscriptionEmail={|Subscriber.Email|}
{|MailingList.Title|} and {|Subscriber.Email|} are sitefinity CMS subscriber fields. When I send out an email these two fields resolve to their respective values. Hence, the URL I get in an email is as following for example.
https://www.domain.com/unsubscribe?mailingList=mymailingList&subscriptionEmail=abc#xyz.com
The user can click on it and unsubscribe from the mailing list.
My Problem:
If the mailing list name has a space in it, the link that appears on the email is broken at the first occurance of the space(link the link shown below breaks immediately =my) and hence clicking it is like clicking a invalid URL.
https://www.domain.com/unsubscribe?mailingList=my mailing List&subscriptionEmail=abc#xyz.com
I dont understand why the space in the URL doesnt resolve to a %20.
My Trial:
I changed the order of the querystrings to see if it works(mailinglist was the last string originally, I put it in the middle)
I am fine if the URL does not get resolved into a link at all, just forcing the users to copy paste the entire URL. But, I was not able to do it as well.
I have read in microsoft forums that OUTLOOK resolves the spacing issue, when the URL is surrounded by < and > like this :
URL here:
But the URL doesnt even show up in the email just like it is not showing up here above this line.
Tested on OUTLOOK, GMAIL, YAHOOMAIL, MICROSOFT MAIL. The link is broken in all email clients.
Any suggestions on what is the best solution for this?

Prevent hyperlinks in HTML emails (namely Outlook)

We've got some HTML emails that get sent out that show email addresses our service has blocked. When viewing the email in Outlook (and presumably in other clients as well) these plain-text email addresses get turned into clickable links that would compose a new message to this address when clicked.
Is there a way to prevent this from happening? Perhaps a meta tag with a flag that would prevent Outlook from converting these into clickable links?
Most email clients strip out META tags, Javascript, and other types of code not necessary for email. Outlook is going to do what it wants with your email, so what you may want to do is wrap the addresses with your own anchor tag and use a blank HREF. Then, style the link to look like the rest of your text.
I think a better answer is to formulate anything that you think a mail client might try to generate a link for in a way that breaks up the string a bit like this: https://stackoverflow.com/a/7625887/470749