[email] UI: make <a> tag hyperlinks in HTML e-mails clickable

VERIFIED FIXED in B2G C1 (to 19nov)

Status

Firefox OS
Gaia::E-Mail
P1
normal
VERIFIED FIXED
5 years ago
4 years ago

People

(Reporter: asuth, Assigned: Daeken)

Tracking

({feature})

unspecified
B2G C1 (to 19nov)
x86_64
Linux
feature
Bug Flags:
in-moztrap +

Firefox Tracking Flags

(blocking-basecamp:+)

Details

(Whiteboard: [fix in bug 799723])

(Reporter)

Description

5 years ago
You can't click on hyperlinks that are part of an HTML message right now.  The actual links are sanitized onto a separate attribute as part of the sanitization process in order to guarantee that no pre-fetching happens and because this UI step was planned.

Per discussion with Casey, the plan is that if you click on a hyperlink we will pop up a confirmation box that asks if you are sure you want to browse to the URL by providing the URL.  This:
1) Serves as our anti-phishing protection by showing you the URL.  Thunderbird and web-mail tend to have the "you can hover on it to see where it really goes" defense.  We have no hover, so that doesn't work for us.
2) Avoids randomly launching the browser app due to mis-touches, mis-interpreted touches, etc.

A similar SMS bug is bug 796788.

This is distinct from automatic detection of things that look like URLs and turning them into hyperlinks; that would happen in both text and HTML e-mails.  I will file that bug now.
(Reporter)

Comment 1

5 years ago
Bug 799723 has been filed for auto-linkification of URLs; it will want to reuse this UI even in the case of plaintext emails.
Blocks: 799723
blocking-basecamp: --- → ?
Nominated for basecamp - seems like a must have.
blocking-basecamp: ? → +
Priority: -- → P2
isn't this a dup of bug 799723?

Updated

5 years ago
Priority: P2 → --
Priority: -- → P1
Assigning to Cody since he's already working on the linkify feature 799723.
Assignee: nobody → cbrocious
Keywords: feature
(Assignee)

Comment 5

5 years ago
I just attached a patch to bug 799723 which covers this issue as well (no way to split it up, really).  Needs cleanup and testing, but otherwise fully functional.  Can anyone comment on the wording?  It currently displays a confirm() dialog that simply says "Browse to $URL$".
Flags: needinfo?
Casey, can you provide proper wording for the confirmation dialog?
Flags: needinfo? → needinfo?(kyee)

Comment 7

5 years ago
We're marking this bug with the C1 milestone since it follows the criteria of "unfinished feature work" (see https://etherpad.mozilla.org/b2g-convergence-schedule).

If this work is not finished by Nov19, this bug will need an exception and will be called out at the upcoming Exec Review.
Target Milestone: --- → B2G C1 (to 19nov)
(Reporter)

Comment 8

5 years ago
(In reply to Cody Brocious [:Daeken] from comment #5)
> I just attached a patch to bug 799723 which covers this issue as well (no
> way to split it up, really).  Needs cleanup and testing, but otherwise fully
> functional.  Can anyone comment on the wording?  It currently displays a
> confirm() dialog that simply says "Browse to $URL$".

The phrasing seems fine by me, I would add a question mark and then you should use the localization infrastructure.  Specifically, it would look like:

var prompt = mozL10n.get('prompt-browse-url', { url: url });

where you would then add to the properties file a line like:
prompt-browse-url=Browse to {{ url }}?

You should be able to find various other examples of using mozL10n throughout the code.
Flags: needinfo?(kyee)
(Reporter)

Comment 9

5 years ago
(didn't mean to clear Casey's information request)
Flags: needinfo?(kyee)
Whiteboard: [fix in bug 799723]
(Reporter)

Comment 10

5 years ago
back-end patch landed on gaia-email-libs-and-more/master by:
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/79

front-end patch with back-end changes landed on gaia/master by:
https://github.com/mozilla-b2g/gaia/pull/6419
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Flags: needinfo?(kyee)

Comment 11

5 years ago
Verified on Unagi Build ID: 2012121231070201
Status: RESOLVED → VERIFIED
we'll need a testcase for this in moztrap specific to html emails
Flags: in-moztrap?(twalker)

Updated

5 years ago
Flags: in-moztrap?(twalker) → in-moztrap?

Updated

4 years ago
Flags: in-moztrap? → in-moztrap?(dwatson)

Comment 13

4 years ago
Created a test case for interacting with links in the body of an e-mail.

https://moztrap.mozilla.org/manage/cases/?filter-id=9276
Flags: in-moztrap?(dwatson) → in-moztrap+
You need to log in before you can comment on or make changes to this bug.