Open Bug 1734473 Opened 4 years ago Updated 3 years ago

<i class="moz-txt-slash"> and <span class="moz-txt-tag"> are assigned within paths in the text despite the missing space before the opening slash. This makes paths in the text unusable.

Categories

(Thunderbird :: Message Reader UI, defect)

defect

Tracking

(Not tracked)

People

(Reporter: Thunderbird_Mail_DE, Assigned: BenB)

Details

Thunderbird can display simple text effects (... for bold, /.../ for italic and ... for undersocre) in plain text messages. And Thunderbird can hide the characters for the text effects. To provide this feature, Thunderbird implements some tags in the message.

These tags are the following for italic text for example:

  • <i class="moz-txt-slash">
  • <span class="moz-txt-tag">

These tags (and the other ones for underlined and bold text) should only be set, when there is a leading space before the opening tag. But Thunderbird does set the tags without leading space. This bug leads to stripped Pathes in plain text. To understand this, here is an example message text:

This is an /italic/ text.
But it could also be *bold* or _underlined_.

The following path should show the leading and closing slash all times:
servername:/path/to/directory/

Using the above described feature now hides slashes in the path, so it looks like this:
servername:path/to/directory

So I would propose to get sure, that tags for the simple text effects only will be implemented in the message, when there is a leading space before the opening character to prevent this bug.

Summary: <i class="moz-txt-slash"> and <span class="moz-txt-tag"> are assigned within paths in the text despite the missing space before the slash. This makes paths in the text unusable. → <i class="moz-txt-slash"> and <span class="moz-txt-tag"> are assigned within paths in the text despite the missing space before the opening slash. This makes paths in the text unusable.
Blocks: tb91found

This is done in M-C code:
https://searchfox.org/mozilla-central/rev/508562cc8579afc87f3738ad9102d54b77badfbe/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#1024
So you need to ask the Netwerk guys (or the original author :BenB) to fix it or submit an M-C patch. Should be moved to Core::Netwerk.

Alex I. (reporter), can you please provide STR including any prefs and html vs. plain text settings?
I'm failing to reproduce or even get the tags.

CC :BenB

Send an e-mail in plain text or HTML with downgrade to plaintext containing servername:/path/to/directory/.
In the sent message or the one in the outbox (send later) you will see that /path/to/directory/ has been turned to italics. Use the inspector to see the classes.

Alex, if we did what you suggest, we would not detect the underlined in your very own example, because it's followed by a "." and not a space:

But it could also be *bold* or _underlined_.

So, your suggestion would fix a rare false positive, but create many, very common false negatives, as your own example shows.

Ditto with ",", ":", "?"; "!" etc.pp. That's why we allow all alphanum characters as delimiter before/after the *. Note that want to specifically allow "Please go here: ..." as well. We do require that the next character is a letter, which avoids too many false positives.

However, it's clear that this heuristic cannot be correct in all cases, that's why we leave the "" and "/" in the text. I think you manually changed a hidden preference to remove the "" and "/". This is not the default, for exactly this reason. If you enable this, you need to accept the consequences.

More info: https://www.bucksch.org/1/projects/mozilla/16507/

(Attention: Bugzilla also does bold recognition, so what you see in your mail is from bugzilla and not from Thunderbird. I've changed my last comment to source code, after the bug mail went out and I noticed this.)

No longer blocks: tb91found
Component: General → Networking
Product: Thunderbird → Core
Version: Thunderbird 91 → unspecified

I am moving this to Thunderbird to access what they want to do here. The code is in necko, but e do not know how to access how important this is.

Component: Networking → General
Product: Core → Thunderbird
Assignee: nobody → ben.bucksch
Component: General → Message Reader UI

Ben Bucksch wrote:

Alex, if we did what you suggest, we would not detect the underlined in your very own example, because it's followed by a "." and not a space:

No, because I suggested to:

that tags for the simple text effects only will be implemented in the message, when there is a leading space before the opening character

Rachel Martin wrote:

Send an e-mail in plain text or HTML with downgrade to plaintext containing servername:/path/to/directory/.
In the sent message or the one in the outbox (send later) you will see that /path/to/directory/ has been turned to italics. Use the inspector to see the classes.

The path will not only be italic. The important issue is, that the first slash (the one after servername:/ is deleted in the resulting text and therefore the linked URL will fail.

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