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

Question about the commit : Support HTML comments & embedded images #108

Open
ericvb opened this issue Feb 12, 2020 · 2 comments
Open

Question about the commit : Support HTML comments & embedded images #108

ericvb opened this issue Feb 12, 2020 · 2 comments

Comments

@ericvb
Copy link

ericvb commented Feb 12, 2020

@bergbria
I saw this new setting 'EnableExperimentalHtmlFeatures' and activated it in my configuration.
The latest githubmaster branch is running on my TFS test server.

I thought, from the commit messages, that inline images in html emails should now appear inline in the Description field and even in the Comment fields, but they don't.
After the pickup of the mail by Mail2Bug, I get an empty box in the Description field.
Looking inside I see:
image
When hovering, the browser says : Cannot load image
(the images is attached to the ticket in the attachements, like before)

Is there some other configuration to do?
Or am I seeing this in the wrong context?

@bergbria
Copy link
Contributor

I unfortunately no longer have access to a Mail2Bug deployment to test this on. It worked in my team's instance when we deployed it but I don't immediately know why it would fail in yours.

If I had to guess the problem, I'd say the elements in your email html have src attributes which don't match the pattern expected by UpdateEmbeddedImageLinks(). You should be able to confirm that by attaching a debugger and seeing what the attachment ContentIds come through as.

string originalImgSrc = $"cid:{attachment.ContentId}";
var matchingImgLinks = dom[$"img[src$='{originalImgSrc}']"];

@mikeyfreake
Copy link

I believe I'm seeing this same issue with HTML emails and embedded images in Azure DevOps. In the below example you can see the text is formatting correctly (bold, red, etc) but the image embedded in the email is not displayed properly. I'm using the following mapping option to generate the below.

<DefaultValueDefinition Field="Repro Steps" Value="##RawMessageBody" />

image

Possibly related is that the image is also not displaying properly in the Attachments area. Even when I attempt to preview the image in ADO it is not displayed properly (see below). The only way to see the image is to download it or open the attached original email.

image

I tried debugging the code (using a clone taken on Feb 19th 2021), looking at class EmailBodyProcessingUtils and method UpdateEmbeddedImageLinks, but this was never hit.

Any input on solving this would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants