Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Prevent quoted message HTML from affecting my response

  • 5 risposte
  • 1 ha questo problema
  • 1 visualizzazione
  • Ultima risposta di david

more options

I am using Thunderbird 115 with mostly default settings. When I compose a brand new message, pressing the Enter key inserts a new paragraph, with extra line spacing, and pressing Shift+Enter inserts a line break with single line spacing. This is how I want things.

I am experiencing a problem when replying to emails from a particular sender. Their emails HTML code contains a "<style>" element that removes the extra spacing for paragraphs:

<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>

When replying to their emails, their HTML is inserted as quoted text, and the "<style>" element affects the whole email, including my response as I compose it. As a result, when I press Enter, I no longer see the extra line spacing, and Enter or Shift+Enter results look the same in the HTML version of my email. Yet they insert different content, and in fact the plain text version of the email still adds two line jumps for paragraphs vs a single jump for line breaks, and I cannot tell while composing.

Then, when I send my email, the recipient email reader (e.g. GMail or Office) appears to somehow pick up the difference again, so my paragraphs are displayed again with extra line spacing. This is an issue, because I cannot tell the difference between paragraphs and line breaks, they look the same to me, and I end up using both interchangeably. But they don't look the same to the recipient, and the resulting response looks messed up.

How can I prevent the quoted email from overriding styles in my own response?

I tried installing the CustomCSS addon to add my own "<style>" element, but unfortunately it gets added at the top of the document, and the quoted response's "<style>" element comes afterwards, thus overriding anything I set.

Perhaps the sender's configuration is at fault (they should not use a global "<style>" like this), but they are a customer, and it would not be appropriate for me to ask them to fix their email configuration.

The only "solution" I can think of is to switch to "Body text" as default style, such that paragraph blocks are never used. I think it is a shame to loose this feature, but at least there is no surprises.

I am using Thunderbird 115 with mostly default settings. When I compose a brand new message, pressing the Enter key inserts a new paragraph, with extra line spacing, and pressing Shift+Enter inserts a line break with single line spacing. This is how I want things. I am experiencing a problem when replying to emails from a particular sender. Their emails HTML code contains a "<style>" element that removes the extra spacing for paragraphs: <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style> When replying to their emails, their HTML is inserted as quoted text, and the "<style>" element affects the whole email, including my response as I compose it. As a result, when I press Enter, I no longer see the extra line spacing, and Enter or Shift+Enter results look the same in the HTML version of my email. Yet they insert different content, and in fact the plain text version of the email still adds two line jumps for paragraphs vs a single jump for line breaks, and I cannot tell while composing. Then, when I send my email, the recipient email reader (e.g. GMail or Office) appears to somehow pick up the difference again, so my paragraphs are displayed again with extra line spacing. This is an issue, because I cannot tell the difference between paragraphs and line breaks, they look the same to me, and I end up using both interchangeably. But they don't look the same to the recipient, and the resulting response looks messed up. How can I prevent the quoted email from overriding styles in my own response? I tried installing the CustomCSS addon to add my own "<style>" element, but unfortunately it gets added at the top of the document, and the quoted response's "<style>" element comes afterwards, thus overriding anything I set. Perhaps the sender's configuration is at fault (they should not use a global "<style>" like this), but they are a customer, and it would not be appropriate for me to ask them to fix their email configuration. The only "solution" I can think of is to switch to "Body text" as default style, such that paragraph blocks are never used. I think it is a shame to loose this feature, but at least there is no surprises.

Tutte le risposte (5)

more options

The switch to body text seems a workable solution, but have you tried responding in plain text? It seems that should work.

È stato utile?

more options

david said

The switch to body text seems a workable solution, but have you tried responding in plain text? It seems that should work.

Thanks, that would work yes, but I then loose the ability to respond with HTML which is not acceptable (our HR-required signature uses HTML).

È stato utile?

more options

If email to this client is infrequent, would you feel comfortable removing the style element? Thunderbird has addons that make editing raw HTML rather easy.

È stato utile?

more options

david said

If email to this client is infrequent, would you feel comfortable removing the style element? Thunderbird has addons that make editing raw HTML rather easy.

This also works, but is quite painful. I have to scroll to locate the offending style element (including scrolling past the fairly large binary PNG data of an image in my signature). If I could setup a rule to automatically remove this, that would be great. Otherwise, this will remain a workaround; I feel this is something any user could have problems with, and not everyone has developer skills to edit HTML.

Alternatively, adding a rule so that all "p" elements inserted by Thunderbird use a style override of my choosing (which would preserve the line spacing) would be nicer, but I don't know of any addon that can do that.

È stato utile?

more options

One final thought from me... consider developing a template with an opposite style statement that you could use when writing to that client. Alternatively, you could respond by rightclicking and selecting 'edit as new' and respond above the client's text. Ok, stick a fork in me; I'm done. Good luck.

È stato utile?

Richiedi supporto

Bisogna accedere al proprio account per rispondere nelle discussioni. Se non si possiede ancora un account, inserire una nuova richiesta.