Closed Bug 1184913 Opened 11 years ago Closed 9 years ago

HTML formatted links (signature) are changed by Thunderbird to ugly blue links

Categories

(Thunderbird :: Message Compose Window, defect)

38 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 210787

People

(Reporter: renaud, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
Does it happen if you start Thunderbird in safe mode? https://support.mozilla.org/en-US/kb/safe-mode
Flags: needinfo?(renaud)
Renaud, please provide Steps to reproduce, Actual result, expected result. Otherwise we'll close this bug as incomplete. How do you expect us to understand or address your problem if it's not even properly described?
Summary: html formated link (signatur) are overwrited by thunderbird to uglies blues links. → HTML formatted links (signature) are changed by Thunderbird to ugly blue links
Whiteboard: [closeme 2015-08-01 incomplete]
(In reply to Thomas D. from comment #2) > Renaud, please provide Steps to reproduce, Actual result, expected result. > Otherwise we'll close this bug as incomplete. How do you expect us to > understand or address your problem if it's not even properly described? Hi, sorry for the short explanation but I hardly write english. We've made an html signatur with links and Thunderbird add this automatically : <a class="moz-txt-link-abbreviated" href="http://www.whitecube.be">www.whitecube.be</a> The result is our links format is overwrited by a default configuration of Thunderbird.
Flags: needinfo?(renaud)
Whiteboard: [closeme 2015-08-01 incomplete]
Renaud, thanks for responding. We need a step by step instruction how to reproduce your problem. Then, a seperate section which describes the problem (actual result). Plus, another section describing your "Expected Result" instead. For starters, can you please attach to this bug a text file containing the full HTML source code of the signature (remove private data as required, but keep structures intact)?
Flags: needinfo?(renaud)
You might be seeing Bug 210787: Link & hover CSS styles for links are ignored while composing (however might get sent correctly unless Delivery format > Auto-Detection dumps your HTML in favor of plaintext, see bug 889315 - delivery format ux fail tracker). Does your link styling arrive correctly for message recipients? Also note that for received messages in your inbox, you might face Bug 31052 (HTML from attachments shown inline leaking into body and vice versa).
I've run into what could be the same bug at various times over the last year or so, although in my case it's not in the signature line, but just in the body of an email message. A test case (which hopefully will work for others) is to create a new email message, then choose "Insert, HTML...", then insert something like the following as the body of the message (this is just the same formatted hyperlink repeated once on each line, but with varying amounts of text inserted in front of it): <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> aaaaaaaaaaaaaaaaaaa <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> aaaaaaaaaaaaaaaaaaa <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a><br> After saving the message and reopening it, I find that formatting is preserved in some of the hyperlinks: <a style="text-decoration:none; color:orange;" href="http://mozilla.org">http://mozilla.org</a> but is stripped from others: <a class="moz-txt-link-freetext" href="http://mozilla.org">http://mozilla.org</a> My copy of Thunderbird is up to date (45.1.0), and it reproduces in a minimally configured version of Thunderbird. I'm using Windows 7 64 bit. If anyone else runs into this bug, a fairly simple workaround is to insert some do-nothing HTML someplace prior to where the hyperlink is losing its formatting. For example insert one or more occurrences of: <span></span>. By shifting things a bit you can make the problem go away.
(In reply to Mark from comment #6) > I've run into what could be the same bug at various times ... Same for me over the last years. Seems to be a algorithm searching for plain text which represent hypertext links, like : http://mozilla.org www.mozilla.org none@mozilla.org . It puts the string into an own html element beginning with '<a class="moz-txt-link-freetext" href="'. To avoid this you can "mask" the strings like this in a html message ( using menu bar - Insert > HTML as you already described ) : http<span>://</span>mozilla.org www<span>.</span>mozilla.org none<span>@</span>mozilla.org . And yes, the algorithm tries to "consider" the string is already part of a link element. But it does that after some interpretation of the code and seems to fail when the start tag comprises line breaks as whitespace. > A test case (which hopefully will work for others) is to create a new email > message, then choose "Insert, HTML...", then insert something like the > following as the body of the message ... beginOfString<br> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <a href="http://mozilla.org" style=" text-decoration: none; color: green;">www.mozilla.org</a><br> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <a href="http://mozilla.org" style=" text-decoration: none; color: green;">www.mozilla.org</a><br> endOfString In my case, inserting this, saving it and displaying the source under 'Drafts' ( Strg+U ) results in : <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head> <body bgcolor="#FFFFFF" text="#333333"> beginOfString<br> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <a href="http://mozilla.org" style=" text-decoration: none; color: green;">www.mozilla.org</a><br> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <a href="http://mozilla.org" style=" text-decoration: none; color: green;"><a class="moz-txt-link-abbreviated" href="http://www.mozilla.org">www.mozilla.org</a></a><br> endOfString<a href="http://mozilla.org" style=" text-decoration: none; color: green;"></a> </body> </html> > ... a fairly simple workaround is to insert some do-nothing HTML ... Similar to my workaround for it. Mask it as described : www<span>.</span>mozilla.org I also put style information in a 'span'-element inside the 'a'-element, because receiving email applications sometimes override styles of the 'a'-tag : <a href="http://www.mozilla.org><span style=" color: green;">www<span>.</span>mozilla.org</span></a>
Is this still present in latest Thunderbird version?
Whiteboard: [closeme 2017-05-15]
I believe there was a time of horror and deception when we simply discarded user-formatted links including their styles if there was no other formatting and if the visible link text was same as URL (href attribute) - as described in bug 414299, amongst other issues. Thanks to bug 584313 (backported to TB 45), for which I and others have advocated without fear or favor in bug 414299, TB has finally learned to respect and preserve any style or class attributes (except moz-* classes used for editor-internal purposes) and to send those as HTML even with delivery-format: Auto-detect. Accordingly, all testcases of comment 6 and comment 7 are worksforme in current TB 52, and get *sent* correctly with HTML style formatting preserved, in signatures or otherwise. I'd love to get confirmation from reporting users that this now works for them, too (using current TB 52). However, we are still violating ux-wysiwyg and decepting the user *during composition*, where indeed we'll always show any links in ugly blue while pretending to ignore the user-defined text color (style="color:..."): Bug 210787. Which is especially odd when the user's background-color happens to be blue (with some lighter color for the text), which will then make linktext invisible during composition, but still send correctly. I understand from the above that what remains of this bug makes this a duplicate of Bug 210787. Please do report any unexpected results which still occur with current version of TB 52 or above (in TB safe-mode).
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Whiteboard: [closeme 2017-05-15]

Clearing the needinfo request since it is pending on an account that cannot answer (a bot, a component watcher, or a disabled account).

For more information, please visit BugBot documentation.

Flags: needinfo?(renaud)
You need to log in before you can comment on or make changes to this bug.