nylas / nylas-mail

:love_letter: An extensible desktop mail app built on the modern web. Forks welcome!
https://nylas.com/nylas-mail/
MIT License
24.81k stars 1.38k forks source link

Composer: Link formatting is malformed #1569

Closed markbao closed 8 years ago

markbao commented 8 years ago

Gmail screenshot. The first one is malformed, the second one is correctly formatted.

image

This seems to be an issue with how N1 does formatting with <span>s.

Original HTML for first link (decoded from base64)

<div>I've written up this solution - let me know if it works. Instructions on how to use it are included.</div>
<div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 
1.4;">https://sites.google.com/a/</span>redacted<span style="line-height: 
1.4;">.columbia.edu/</span>redacted<span style="line-height: 1.4;">/</span>mouselab-code-
snippets</div>

Compare to HTML from the second link:

<div>https://redacted.columbia.edu/redacted/content.php<br>

Bug?

mbilker commented 8 years ago

There should be a fix for this in the new version IIRC.

markbao commented 8 years ago

@bengotow @mbilker I believe this is fixed in the new version; just tried composing a new message and using the same link that I used before, and it is displaying correctly in N1 as well as in Gmail web. Thanks!

markbao commented 8 years ago

Reopening since this is still an issue when using a link of form https://x.x.columbia.edu/x.

Gmail:

image

N1:

image

mbilker commented 8 years ago

Could you provide the HTML source like your original example?

markbao commented 8 years ago

Good call, thanks @mbilker.

<div><span style="line-height: 1.4;">https://</span>redacted<span style="line-height: 1.4;">.</span>redacted<span style="line-height: 1.4;"><a href="http://.columbia.edu/redacted/redacted" target="_blank" title="http://.columbia.edu/redacted/redacted">.columbia.edu/redacted</a>?</span>q<span style="line-height: 1.4;">=1</span></div>
bengotow commented 8 years ago

Hey folks! We totally replaced the autolinker library which was auto-linkifying message bodies (For other reasons... it was parsing HTML with regexp...) and I've verified that the https://x.x.columbia.edu/x. style link now works. Enjoy!

markbao commented 8 years ago

Thank you!