nylas-mail icon indicating copy to clipboard operation
nylas-mail copied to clipboard

Inline images not rendering correctly - body contains raw html

Open majal opened this issue 10 years ago • 10 comments

Please see attached image from WP email. This had been around for quite a while... (I'm using N1 for Vivid)

screenshot from 2015-12-26 17-20-59

majal avatar Dec 26 '15 09:12 majal

Thanks for the bug report @Majal. What OS are you on? What version of N1? Do these emails render properly in other mail clients?

This looks like a parsing bug for the email since there are some HTML attributes in that image.

mbilker avatar Dec 27 '15 23:12 mbilker

I just got a similar error with a Google+ email.

2015-12-27-22-33-11_818x525 modified

Should look like (from Gmail web):

2015-12-27-22-36-25_722x272

mbilker avatar Dec 28 '15 03:12 mbilker

It have something to do with URL parsing

mbilker avatar Dec 28 '15 03:12 mbilker

Hi @mbilker,

OS: Description: Ubuntu Xenial Xerus (development branch) Release: 16.04 Codename: xenial

N1 Version: 0.3.32-b11131d

Rendering in other clients? Yes, correctly in all I've used: Gmail, Thunderbird, and Geary

Yup, N1 does seem to have problems in parsing HTML. We hope the devs can get this fixed soon. More (coffee) power to you!

Majal

majal avatar Dec 28 '15 15:12 majal

Hey folks—the issue here is this HTML in the message body:

<img border="0" class="" src="http://0.gravatar.com/avatar/3e8e161d97d793bd8fc2d=
cd62583bb76?s=100&amp;d=mm&amp;r=g" alt="Dominik Schilling" / style=
="max-width: 100%; height: auto; margin-bottom: 12px; clear: bot....

(Notice that / sitting right in the middle between src and style.) Unfortunately it's throwing off autolinker, which linkifies the src thinking that it's a link outside of a tag. Not sure what the best course of action is here, but we definitely need to fix it.

bengotow avatar Dec 28 '15 18:12 bengotow

I have this same issue on all Google+ emails. Rendering is broken there.

bashok001 avatar Feb 19 '16 16:02 bashok001

Hey folks—I believe we've finally tracked this down. This appears to be the cause:

https://github.com/gregjacobs/Autolinker.js/issues/146

bengotow avatar Mar 08 '16 01:03 bengotow

Thank you tracking this down @bengotow !

mbilker avatar Mar 08 '16 02:03 mbilker

This should be fixed now that we're using our own DOM-aware link highlighting instead of autolinker. Stay tuned! 465831175aa00e3e8a08de6d2791d9e37f516c54

bengotow avatar Mar 14 '16 19:03 bengotow

Hey! This shipped in 0.4.19 a few minutes ago. You can grab the update by choosing "Check for Updates" from N1's application menu, or download the new version directly from the releases section of the project. Enjoy!

bengotow avatar Mar 25 '16 23:03 bengotow