Closed Bug 1224329 Opened 10 years ago Closed 7 years ago

FxOS Browser App does not normalize/URL-decode mailto links on "copy link" like desktop Firefox's specialized "copy email address" logic does

Categories

(Firefox OS Graveyard :: Gaia::Browser, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mihaibn, Unassigned)

Details

(Keywords: foxfood, Whiteboard: [bzlite])

User-Agent: Mozilla/5.0 (Mobile; rv:45.0) Gecko/45.0 Firefox/45.0 Go to a website like https://github.com/Sergio-Muriel and on the email address do a copy link. Paste this link in the email app. Expected result: tfeserver@gmail.com Actual result: mailto:%74%66%65%73%65%72%76%65%72@%67%6d%61%69%6c.%63%6f%6d
I am using the latest OTA of today on the nightly-latest channel on my Flame.
Component: Gaia::Feedback → Gaia::E-Mail
This is a browser issue. Presumably it is just stuffing the href into the clipboard. While this is arguably reasonable, it also is inconsistent with what Firefox desktop does. The "a" tag in the page you reference is literally: <a class="email" href="mailto:%74%66%65%73%65%72%76%65%72@%67%6d%61%69%6c.%63%6f%6d">tfeserver@gmail.com</a> On desktop nightly firefox if I run this code in the dev console, attaching it to a contenteditable: texty.addEventListener('paste', pastefunc); function(event) { var dt = event.clipboardData; console.log('types', dt.types); for (var i = 0; i < dt.types.length; i++) { console.log('type:', dt.types[i], '=', dt.getData(dt.types[i])); } } And then "copy email address" with a right-click, I get: types DOMStringList [ "text/plain" ] type: text/plain = tfeserver@gmail.com If I manually select the range of text and control-c to copy the selection (in which case we expect to be getting HTML), I get: types DOMStringList [ "text/html", "text/plain" ] type: text/html = <a class="email" href="mailto:%74%66%65%73%65%72%76%65%72@%67%6d%61%69%6c.%63%6f%6d">tfeserver@gmail.com</a> type: text/plain = tfeserver@gmail.com I mention this because it confirms that Firefox isn't magically normalizing things on document parse or anything. Then on Firefox OS with b2g-desktop, if I dump the same code in the email app because that's easiest, if I do "copy link" and then control-v (I couldn't get the pretty copy/paste handle things to come up, but I think they're orthogonal in this case), I get: LOG: types [object DOMStringList] LOG: type: text/plain = mailto:%74%66%65%73%65%72%76%65%72@%67%6d%61%69%6c.%63%6f%6d Note that there is no metadata here or alternate type that would tell the email app (or all other apps) "hey, this content is a link that may be URL encoded". It's plaintext and there's an inherent ambiguity that the receive of the "paste" event can not resolve as to whether the user really wanted to paste that text or it was "copy link" not going far enough.
Status: UNCONFIRMED → NEW
Component: Gaia::E-Mail → Gaia::Browser
Ever confirmed: true
Summary: Paste email link in the email app shows garbage chars → FxOS Browser App does not normalize/URL-decode mailto links on "copy link" like desktop Firefox's specialized "copy email address" logic does
Er, and note that on firefox nightly, there is *only* "copy email address" in the context menu. There is no "copy link location" like there is for non-mailto links.
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.