Closed Bug 996192 Opened 11 years ago Closed 7 years ago

[Email] HTML snippet generation whitespace; generate whitespace for stripped HTML tags implying whitespace

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, enhancement)

ARM
Gonk (Firefox OS)
enhancement
Not set
normal

Tracking

(blocking-b2g:-, tracking-b2g:+)

RESOLVED WONTFIX
blocking-b2g -
tracking-b2g +

People

(Reporter: bzumwalt, Unassigned)

References

Details

(Whiteboard: [feature])

Attachments

(2 files)

Attached image Screenshot
Description: In the inbox, text previews of email messages have no space in between the first line of the message and the next line. There are no spaces between line breaks. This can be seen in short messages in preview text of the body and the date timestamp (e.g. "Message textOn [Day] [Year] at [Time]") This was tested and occurs with both Gmail and Outlook emails using IMAP+SMTP and ActiveSync respectively. Repro Steps: 1) Updated Buri to BuildID: 20140414040203 2) Lauch email 3) Sign into valid email address 4) Proceed to and observe inbox Actual: Text separated by line breaks are not separated by space in preview text. Expected: Space separates text separated by line breaks in text preview. Environmental Variables: Device: Buri Master M-C Mozilla RIL BuildID: 20140414040203 Gaia: f3abbd2d0a60f1a1618db93f8b1957cae6de379c Gecko: 215080b813a7 Version: 31.0a1 Firmware Version: v1.2-device.cfg Notes: Repro frequency: 3/3, 100% See attached: screenshot
So this must be an HTML message. It would be handy to have a copy of the message as described at https://wiki.mozilla.org/Gaia/Email/ProvidingEmailsForDebugging in order to better be sure what the cause of the problem is. I think the most likely explanation is the text is ending up like: "Foo<p>bar</p>" or "<p>Foo</p><p>bar</p>". In that case when we strip the tags, we'll end up with "Foobar" in both cases. Effectively, the 'p' tags correspond to whitespace because they are "display: block" which inherently produces whitespace, so we should be inserting a space. It might make sense to use the callback mechanism for this with a regex that matches core HTML tags that are defined to be "display: block" or do other fancy-stuff. ("display: list-item" for example.) I think adding explicit strip functionality for this might be too feature-creepy, although there could be arguments for the html5 parser for knowing these things...
Severity: normal → enhancement
Flags: needinfo?(bzumwalt)
Summary: [B2G][Email] Message preview text in inbox is missing space between line breaks → [Email] HTML snippet generation whitespace; generate whitespace for stripped HTML tags implying whitespace
Whiteboard: [feature]
Issue still occurs on latest Master M-C on Buri. Environmental Variables: Device: Buri Master M-C Mozilla RIL BuildID: 20140417040206 Gaia: dadf0e60a6421f5b57ee9fc536c6617212805c19 Gecko: c55dfb01a027 Version: 31.0a1 Firmware Version: v1.2-device.cfg Email message from Gmail (See Attached image to view how below message appears on device): MIME-Version: 1.0 Received: by 10.220.65.66 with HTTP; Thu, 17 Apr 2014 15:28:06 -0700 (PDT) Date: Thu, 17 Apr 2014 15:28:06 -0700 Delivered-To: bzumwalt@qanalydocs.com Message-ID: <CAAZtn1eEdXAz3_ZAho1gh9iBE=o=JnzjP_Ggi+z3BEs2OZfoTQ@mail.gmail.com> Subject: bugTest From: Brogan Zumwalt <bzumwalt@qanalydocs.com> To: Brogan Z <qabpztest@gmail.com> Content-Type: multipart/alternative; boundary=f46d043be01614876a04f7448c30 --f46d043be01614876a04f7448c30 Content-Type: text/plain; charset=ISO-8859-1 First Line Second Line Third Line --f46d043be01614876a04f7448c30 Content-Type: text/html; charset=ISO-8859-1 <div dir="ltr">First Line<div>Second Line</div><div>Third Line</div></div> --f46d043be01614876a04f7448c30--
Flags: needinfo?(bzumwalt)
Thanks very much for providing the raw message content and the accompanying screenshot! This agrees with my theory in comment 1, so I think we're good-to-go data-wise.
Nominate for 3.0 work, a nice to have enhancement.
blocking-b2g: --- → 3.0?
I am still able to reproduce this bug.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Status: UNCONFIRMED → NEW
Ever confirmed: true
blocking-b2g: 2.5? → -
tracking-b2g: --- → +
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: