Auto-convert text URLs to links in received HTML (!) emails

User Help for Mozilla Thunderbird
Post Reply
nvx
Posts: 30
Joined: July 11th, 2007, 5:16 am

Auto-convert text URLs to links in received HTML (!) emails

Post by nvx »

Hi,

Is it possible to force TB to automatically parse text URLs (i.e., URLs which are not surrounded by the "A" HTML tag) to "clickable" links in received HTML messages? What I mean is that I'd like TB to behave just as it does in case of plain text messages where all URLs and email addresses are automatically converted to their clickable form.

Thanks.

nvx
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by tanstaafl »

You don't need to do anything as long as the URL includes http:// or https:// . I just tested that. It recognized that https://www.freshnews.org was a URL and automatically converted it into a link. I also looked at the raw message source on the received message to verify that the editor didn't add a HTML tag without my knowing it.
nvx
Posts: 30
Joined: July 11th, 2007, 5:16 am

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by nvx »

Thank you for the clarification. Since this is supposed to work out-of-the-box, I checked the source codes of a couple of messages exhibiting this issue (mainly new tweet notifications sent via IFTTT) just to be sure. These contained rather plain HTML with both regular URLs (e.g. http://twitter.com/neiltyson/status/1046978621477400576) and shortened ones (e.g. https://t.co/p6Jk1Hly3U) being present. None of them, however, have been converted to clickable links.

Is there perhaps some advanced parameter in the Config Editor that I should look at?

Thanks.

nvx

----------
Update: a quick Google search revealed that this is due to something being rotten in the IFTTT emails themselves, because users report URLs not being clickable also when other email clients are used... :/
----------
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by tanstaafl »

I tested again using the two URLs you posted, no problem. I tested both with and without "send messages as plain text if possible" checked in the send options.

I didn't spot a relevant setting in http://kb.mozillazine.org/Mail_and_news_settings and https://support.mozilla.org/en-US/kb/hy ... ot-working didn't have anything useful. Try browsing the modified settings using the config editor to see if you can spot something relevant. If they've been modified they will be bolded.

https://bugzilla.mozilla.org/show_bug.cgi?id=137583 mentions that the code (to recognize URLs) doesn't like white space and link breaks in the URL. That wouldn't be an issue with the two URLs you provided.

Do links due to HTML tags still work ? If that is broken (doesn't know what browser to use) perhaps its messing up the URL recognition as a side effect.

Try retesting while running in safe mode (help restart with add-ons disabled) to rule out it being the side effect of a broken add-on.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by tanstaafl »

Just spotted your update. Could you post the link you found, I'd like to learn more about what was wrong with them.
nvx
Posts: 30
Joined: July 11th, 2007, 5:16 am

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by nvx »

E.g. in case of K-9, someone reported it here: https://grokbase.com/t/gg/k-9-mail/129x ... from-ifttt. I also vaguely remember that when in the past I was using Claws Mail the links were not clickable either. Back then I thought it was due to some problem with CM (it being a plain text email client displaying "de-HTMLed" HTML messages (it certainly was not displaying the plain text portions of the multipart messages because there the links are in encoded form with long base-64 strings).

Additionally, the discussed IFTTT issue seems to not be limited to just emails: https://www.reddit.com/r/ifttt/comments ... t_working/

In any case, many other email clients/webmail interfaces which I tested just now (eM Client, MS Outlook, Gmail web UI, Gmail Android app, ...) display the respective messages just fine with the links being clickable.

For completeness' sake, here is the offending source code (the relevant portion of it) from one of the messages -- the actual message starts with "@neiltyson" (see the TD tag at the very end):

Code: Select all

<html>
  <head>
    <style type=3D"text/css">
      img{border:0;clear:both;display:block;float:none;height:auto !importa=
nt;margin: 3px 10px 3px 0;max-width:100% !important}
      object, embed{border:0;clear:both;display:block;float:none}
      a img{text-decoration:none}
      p{clear:both}
      .content * {font-family:'AvenirNext-Regular', Avenir, 'Helvetica Neue=
', Arial, Helvetica, sans-serif;font-size:18px;line-height:1.4;color:#333 !=
important;}
      font {line-height: inherit !important; font-size: inherit !important}
      a, a:visited, .content a {color:#09f !important;text-decoration:none =
!important}
      h1 a {color: white !important}

      h1 {font-size:36px !important}
      h2 {font-size:27px !important}
      h3 {font-size:21px !important}
      h4 {font-size:18px !important}
      h5 {font-size:18px !important}
      h6 {font-size:18px !important}
      h1, h2, h3 { line-height: 1.125 !important }
      h4, h5, h6 { line-height: 1.25 !important }


      @media screen and (max-width:700px) {
        .content {
          width: 100%!important;
        }
      }
    </style>
  </head>

  <body>
    <table cellpadding=3D"0" cellspacing=3D"0" border=3D"0" style=3D"paddin=
g:0px;margin:0px;text-decoration:none;" width=3D"100%">
      <tr>
        <td style=3D"padding:0px;margin:0px;">
          <table class=3D"content" cellpadding=3D"0" cellspacing=3D"0" bord=
er=3D"0" width=3D"600">
            <tr>
              <td>
                <table style=3D"border-collapse:collapse;width:100%;max-wid=
th:100%" cellpadding=3D"0" cellspacing=3D"0">
  <tr>
    <td>
      @neiltyson:<br><br>
Happy 60th Birthday, @NASA
https://t.co/p6Jk1Hly3U https://t.co/4mXjNO17e9<br><br>
(http://twitter.com/neiltyson/status/1046978621477400576)
    </td>
  </tr>
</table>
I know that the CSS definition requests undecorated links, but that is not the same as links which are not clickable...

nvx
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by tanstaafl »

Thanks.
sfhowes
Posts: 750
Joined: April 1st, 2012, 10:21 am

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by sfhowes »

Some mobile apps send links that are not clickable in TB if View/Message Body As is Original or Simple HTML (Plain Text makes the links clickable). I just tested this by sending a message from the Outlook app on my phone; the message contained a link typed in as http://www.somedomain.com If I had embedded the link in some text, the link would have been clickable. The mail app doesn't offer the option to send as plain text.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by tanstaafl »

Could you post the HTML source for one of those messages, like nvx did? I'd like to collect several test cases and then file a bug report.

https://bugzilla.mozilla.org/show_bug.cgi?id=680352 is the closest bug report I could find and its really complaining about Thunderbird not automatically adding a protocol prefix to make a URL clickable.
nvx
Posts: 30
Joined: July 11th, 2007, 5:16 am

Re: Auto-convert text URLs to links in received HTML (!) ema

Post by nvx »

@tanstaafl: A bug report would be awesome, thank you!
Post Reply