URLs being dropped from Thunderbird-generated replies

Hi @BradCray ,
I’ve experienced this same problem too when using import_mbox.sh on mailman mbox archives.

I tracked the problem down to extract_from_mozilla(doc) in lib/email/receiver.rb and made a simple fix which I’ve put in a PR https://github.com/discourse/discourse/pull/13176 .

The extract_from_mozilla method was making any tag with a class attribute starting with "moz-" hidden. My adjustment excludes from these hidden tags any of them with a class attribute starting with ^moz-txt-link\b which I think covers Thunderbird’s links (based on the large mbox I was working with).

I haven’t had time to write tests so the PR might not get accepted but feel free to use it (although be aware it’ll probably be wiped out by any upgrade unless the PR is accepted).

I’ve only tested on imported mboxes but I think it should work on newly received email.
Unfortunately I don’t think it will apply during a rebake (it didn’t for me) so might be pretty hard to apply retrospectively.

4 Likes