Getting rid of moz classes in html

User Help for Mozilla Thunderbird
Post Reply
Mr_Postman
Posts: 10
Joined: November 15th, 2021, 8:49 am

Getting rid of moz classes in html

Post by Mr_Postman »

Hi all,

Running 91.3.2 64-bit under Windows 10.

I try to compose an html message with a simple signature that includes my email and the URL of my website. I insert the html code via the QuickText add-on. So, here's what I finally get: my valid

Code: Select all

E-mail: <a href="mailto:me@mydomain.com">me@mydomain.com</a><br>
Web: <a href="https://www.mydomain.com">mydomain.com</a><br>
turns into

Code: Select all

E-mail: <a href="mailto:me@mydomain.com"class="moz-txt-link-freetext"moz-do-not-send="true">me@mydomain.com</a><br>
Web: <a href="https://www.mydomain.com"moz-do-not-send="true">mydomain.com</a><br>
in my Sent folder and in the recipient's Inbox.

Is there a way to get rid of these moz-txt-link-freetext and moz-do-not-send? prefs.js doesn't suggest anything obvious.

Thanks for any tips.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Getting rid of moz classes in html

Post by tanstaafl »

That's a template based add-on. Do you use the same signature in every message? If so why not specify it in the accounts settings instead of in a template. If you need to use just a few different signatures you could create a multiple identity that has a minor cosmetic difference such as add a middle initial in the From: address (in the display part, not the email address part) and specify a unique signature in it.
Mr_Postman
Posts: 10
Joined: November 15th, 2021, 8:49 am

Re: Getting rid of moz classes in html

Post by Mr_Postman »

Thank you for your advice, tanstaafl. I managed to get a clean code by both (1) moving the signature into an external html file that I pointed the account settings to, and (2) putting the email address just between the a tags removing mailto etc.

Code: Select all

E-mail: <a>me@mydomain.com</a><br>
While this workaround works, I still can only wonder what's the use of linkification within the html code at all. ](*,) It seems as yet another thing broken in the 91 line. Sad.
Mr_Postman
Posts: 10
Joined: November 15th, 2021, 8:49 am

Re: Getting rid of moz classes in html

Post by Mr_Postman »

After a bit of experimenting I came to a much better solution:

Code: Select all

E-mail: <a href="mailto:me@mydomain.com">me<span>@</span>mydomain.com</a><br>
Web: <a href="https://www.mydomain.com">mydomain<span>.</span>com</a><br>
While keeping the reference part unchanged, this suppresses the linkification in the free text and voila, no more undefined classes in the html of the message. It works perfectly via both an external signature and the template add-ons like QuickText.

Solved, thanks everybody.
Mr_Postman
Posts: 10
Joined: November 15th, 2021, 8:49 am

Re: Getting rid of moz classes in html

Post by Mr_Postman »

P.S. Also, using a signature in an external file adds the following to the html part of the message:

Code: Select all

<div class="moz-signature">
...your inserted file content goes here...
</div>
Needless to say, the moz-signature class remains undefined in your message as well.
Post Reply