[MMS] Typing more than one space will be sent and received as just one

VERIFIED FIXED

Status

Firefox OS
Gaia::SMS
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: isabelrios, Assigned: gerard)

Tracking

unspecified
x86_64
Windows 7

Firefox Tracking Flags

(blocking-b2g:leo+, b2g18 verified, b2g-v1.1hd fixed)

Details

(Whiteboard: MMS_TEF)

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Unagi 06/13 build:
Gecko-fb33bb3
Gaia-6627a1e

PROCEDURE
1. Compose a new MMS
2. Type text including spaces, i.e.: 1 2  3    4 (one space, then two, then four)
3. Send the MMMS
4. Check the MMS sent and received

EXPECTED
The MMS is sent as it was composed

ACTUAL
The text received is 1 2 3 4, only one space between each number
2 questions :
* Have you received the MMS on a Firefox OS phone, or on another phone ?
* Have you sent the MMS from a Firefox OS phone, or from another phone ?

Could you try all combinations so that we can know what's happening ?
Keywords: qawanted
Flags: needinfo?(isabelrios)
(Assignee)

Comment 2

4 years ago
I'll check on this one.
(Reporter)

Comment 3

4 years ago
Hi,
The MMS was sent and received by a FFOS: NOK
MMS sent from FFOS and received by Android: OK
Flags: needinfo?(isabelrios)
Keywords: qawanted
Oki, so it means that we're not formatting the text when we receive it in a MMS. We do it for SMS.

I think we're using Utils.format to do that.

But I thought we could move from using Utils.format to using a normal div with a "white-space: pre-wrap" CSS rule (see https://developer.mozilla.org/en-US/docs/Web/CSS/white-space) and get rid of Utils.format. Now could be a good time

Alex, could you try to investigate on this ?
(Assignee)

Comment 5

4 years ago
Sure.
(Assignee)

Updated

4 years ago
Assignee: nobody → lissyx+mozillians
(Assignee)

Comment 6

4 years ago
I'm reproducing it in gaia/master inside Firefox Nightly, will be easier :)
(Assignee)

Comment 7

4 years ago
Created attachment 761994 [details]
Screenshot of hackish try with white-space: pre-wrap;

Julien, it seems to be working with white-space: pre-wrap. I need to do it more properly, but it's a good starting point.
(Assignee)

Comment 8

4 years ago
(In reply to Julien Wajsberg [:julienw] from comment #4)
> Oki, so it means that we're not formatting the text when we receive it in a
> MMS. We do it for SMS.
> 
> I think we're using Utils.format to do that.
> 
> But I thought we could move from using Utils.format to using a normal div
> with a "white-space: pre-wrap" CSS rule (see
> https://developer.mozilla.org/en-US/docs/Web/CSS/white-space) and get rid of
> Utils.format. Now could be a good time
> 
> Alex, could you try to investigate on this ?

I don't see any Utils.format in the code. However, there is a Utils.Message.format(). Were you referring to this one ?

I suspect you were referring to this ".replace(rformatting.nbsp, '  ')" call, right?
(Assignee)

Comment 9

4 years ago
Created attachment 762005 [details]
Link to Github https://github.com/mozilla-b2g/gaia/pull/10367

Please find attached a link to the Github pull request which fixes the issue.
Attachment #762005 - Flags: review?(waldron.rick)
Attachment #762005 - Flags: review?(felash)
(In reply to Alexandre LISSY :gerard-majax from comment #8)

> I don't see any Utils.format in the code. However, there is a
> Utils.Message.format(). Were you referring to this one ?
> 
> I suspect you were referring to this ".replace(rformatting.nbsp, '  ')"
> call, right?

Exactly, and indeed to all this method, as `pre-wrap` understands '\n'.
We'll block on this now, as we suspect it will come back to bite us otherwise.
blocking-b2g: leo? → leo+
Comment on attachment 762005 [details]
Link to Github https://github.com/mozilla-b2g/gaia/pull/10367

r=me, thanks !
Attachment #762005 - Flags: review?(waldron.rick)
Attachment #762005 - Flags: review?(felash)
Attachment #762005 - Flags: review+
master: 141ed6da339f477523dcc932217fc0ba7a0ea68d
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Uplifted 141ed6da339f477523dcc932217fc0ba7a0ea68d to:
v1-train: 613e69ee0a009399130ad2cbb8b9d0462cd1fc70
status-b2g18: --- → fixed
1.1hd: 613e69ee0a009399130ad2cbb8b9d0462cd1fc70
status-b2g-v1.1hd: --- → fixed
Hi,

We have checked this bug with the latest V1-train version:
Gecko: 24aedf8
Gaia: 0b0cd9e

using an Unagi device and it works as expected so we mark it as VERIFIED
Status: RESOLVED → VERIFIED

Updated

4 years ago
status-b2g18: fixed → verified
You need to log in before you can comment on or make changes to this bug.