Open Bug 1796107 Opened 3 years ago Updated 3 years ago

Unexpected italic text in plain text message (quoted-printable), starting from a forward slash in </a> as text

Categories

(Thunderbird :: Message Reader UI, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: mozilla, Unassigned)

Details

Attachments

(2 files)

Attached file italic_example.eml

Steps to reproduce:

A message (see attached file - private headers removed) I crafted in PHP resulted in a part italic text, where there should be no italic text.

Version: 102.3.3 (64-Bit)

Actual results:

italic text where there shouldn't be one

Expected results:

No italic text

Bla "<a href=3D"#">foo2</a>" =C3=B6ffnen: https://www.example.com/foo/i=
ndex.php?bar/

Attachment #9299215 - Attachment mime type: message/rfc822 → text/plain

This is caused by the forward slashes. Thunderbird recognizes a couple of formatting markers like *bold*, /italics/, _underline_ in plaintext messages, which is by design. Not sure if it can be switched off.
However, it's a little bit surprising in your case why the slash in </a> gets recognized as a starting point of italic. Maybe an artifact or edge case. Not something we would worry much about. Is it a problem for you?

Severity: -- → S4
Flags: needinfo?(mozilla)
Summary: italic text, where there shouldn't be one → Unexpected italic text in plain text message (quoted-printable)

This is reporter's testcase in message reader.

Component: Untriaged → Message Reader UI

Well it might confuse customers when they see the plain message and the whole email is in italic. This might not happen often, but when using the customers name (which in this example is "<a href="#">foo2</a>"), it will occur. It might even occur for other character constellations, I don't know.

Flags: needinfo?(mozilla)
Summary: Unexpected italic text in plain text message (quoted-printable) → Unexpected italic text in plain text message (quoted-printable), starting from a forward slash in </a> as text

(In reply to Thomas D. (:thomas8) from comment #2)

This is caused by the forward slashes. Thunderbird recognizes a couple of formatting markers like *bold*, /italics/, _underline_ in plaintext messages, which is by design. Not sure if it can be switched off.

Yes, set the Pref mail.display_struct to FALSE.

http://kb.mozillazine.org/Plain_text_e-mail_%28Thunderbird%29#Structured_Text

(In reply to Thomas D. (:thomas8) from comment #2)

However, it's a little bit surprising in your case why the slash in </a> gets recognized as a starting point of italic.

It's a text/plain message and not HTML.

(In reply to Alfred Peters from comment #5)

(In reply to Thomas D. (:thomas8) from comment #2)

This is caused by the forward slashes. Thunderbird recognizes a couple of formatting markers like *bold*, /italics/, _underline_ in plaintext messages, which is by design. Not sure if it can be switched off.

Yes, set the Pref mail.display_struct to FALSE.

http://kb.mozillazine.org/Plain_text_e-mail_%28Thunderbird%29#Structured_Text

Yeah but I cannot tell my customers to do that ;)
Is there any way to escape it in PHP without breaking something else in other mail clients?

(In reply to Alfred Peters from comment #6)

(In reply to Thomas D. (:thomas8) from comment #2)

However, it's a little bit surprising in your case why the slash in </a> gets recognized as a starting point of italic.

It's a text/plain message and not HTML.

I know that, the "</a>" is in the plain text (weird enough), I thought maybe leading slash must be preceded by a space to be taken as italics, but apparently not.

Ah OK, I got that wrong.

https://searchfox.org/comm-central/source/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#613
| bool mozTXTToHTMLConv::StructPhraseHit( ...
| /* We're searching for the following pattern:
| LT_DELIMITER - "" - ALPHA -
| [ some text (maybe more "
"-pairs) - ALPHA ] "*" - LT_DELIMITER.
| <strong> is only inserted, if existence of a pair could be verified
| We use the first opening/closing tag, if we can choose */

https://searchfox.org/comm-central/source/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#541

See also: Bug 950605, Bug 950606, Bug 106028

This might be a dupe of Bug 950606?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: