Closed
Bug 872500
Opened 12 years ago
Closed 12 years ago
E-mail application offers to open all links (use 'pattern' instead of 'regexp in manifest)
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect)
Tracking
(firefox21 unaffected, firefox22 affected, firefox23 affected, firefox24 affected, b2g18 unaffected, b2g18-v1.0.1 unaffected)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox21 | --- | unaffected |
| firefox22 | --- | affected |
| firefox23 | --- | affected |
| firefox24 | --- | affected |
| b2g18 | --- | unaffected |
| b2g18-v1.0.1 | --- | unaffected |
People
(Reporter: cwiiis, Assigned: kgrandon)
References
Details
Attachments
(1 file)
When clicking a link in an application, such as Twitter, a dialog pops up offering to open it in the browser or the e-mail application. This happens for all links. master is affected, last time I checked, this was fine on v1-train.
Comment 1•12 years ago
|
||
Bug 853019 landed in mozilla-central on March 27th which means this affects Firefox/Gecko 22 and later.
status-b2g18:
--- → unaffected
status-b2g18-v1.0.1:
--- → unaffected
status-firefox21:
--- → unaffected
status-firefox22:
--- → affected
status-firefox23:
--- → affected
status-firefox24:
--- → affected
Comment 2•12 years ago
|
||
Andrew, how can this be related to this problem? If that code need to be updated, I can take care of it...
Comment 3•12 years ago
|
||
https://github.com/mozilla-b2g/gaia/blob/master/apps/email/manifest.webapp#L61
We need to add "pattern" to the url thing since it is used instead of "regexp" on firefox 22+. We may need to change the syntax too. (It sounds like pattern may already include the '^' so we might not need that. MDN's docs were not immediately clear and other apps like the browser have not been updated yet.)
Comment 4•12 years ago
|
||
> We need to add "pattern" to the url thing since it is used instead of
> "regexp" on firefox 22+. We may need to change the syntax too. (It sounds
> like pattern may already include the '^' so we might not need that. MDN's
> docs were not immediately clear and other apps like the browser have not
> been updated yet.)
Right. The pattern string is converted in ^(?:' + pattern + ')$'
We need to update:
browser/manifest.webapp
"url": { "required":true, "regexp":"/^https?:.{1,16384}$/" }
"url": { "required":true, "pattern":"https?:.{1,16384}" }
communications/manifest.webapp
"number": { "regexp":"/^[\\d\\s+#*().-]{0,50}$/" }
"number": { "pattern":"[\\d\\s+#*().-]{0,50}" }
email/manifest.webapp
"url": { "required":true, "regexp":"/^mailto:/" }
"url": { "required":true, "pattern":"mailto:.{1,16384}" }
homescreen/manifest.webapp
"url": { "required":true, "regexp":"/^https?:/" }
"url": { "required":true, "pattern":"https?:.{1,16384}" }
sms/manifest.webapp
"number": { "regexp":"/^[\\w\\s+#*().-]{0,50}$/" }
"number": { "pattern":"[\\w\\s+#*().-]{0,50}" }
We need a double check for these regexps.
tef? leo?
blocking-b2g: --- → leo?
Comment 5•12 years ago
|
||
The change is only on firefox 22+; so we want to add pattern and not remove regexp until firefox 18 is long gone, I believe. If you're going to do all apps, I think you'll want to do that on bug 857059.
Because b2g18 is fine, neither tef or leo needs the fix.
blocking-b2g: leo? → ---
Comment 6•12 years ago
|
||
Sms case is handled in the patch for Bug 806490.
Updated•12 years ago
|
Summary: E-mail application offers to open all links → E-mail application offers to open all links (use 'pattern' instead of 'regexp in manifest)
| Assignee | ||
Comment 9•12 years ago
|
||
This bug was driving me crazy. Baku would you be comfortable reviewing this one?
Attachment #782831 -
Flags: review?(amarchesini)
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Comment 10•12 years ago
|
||
Comment on attachment 782831 [details]
Github pull request pointer
lgtm
Attachment #782831 -
Flags: review?(amarchesini) → review+
| Assignee | ||
Comment 11•12 years ago
|
||
Landed in master: https://github.com/mozilla-b2g/gaia/commit/6ed86aef1ecfe15178bb1cfb358db1fa45febe7e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 14•12 years ago
|
||
So Kevin you just broke the compatibility with b2g18, right ? :)
Could it be possible to keep both properties "regexp" and "pattern" (as was the case in the Sms app btw) ?
Comment 16•12 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #14)
> So Kevin you just broke the compatibility with b2g18, right ? :)
>
> Could it be possible to keep both properties "regexp" and "pattern" (as was
> the case in the Sms app btw) ?
Ignoring the dev-gaia thread about gaia/master support on b2g18, I think the right call to make here is based on what provides the best example for people out there developing apps for Firefox OS who look to the Gaia apps for guidance. Since we are shipping v1.0.1 devices and v1.1 devices and those need the old way still, I think we should keep both around.
| Assignee | ||
Comment 17•12 years ago
|
||
Someone can back my patch out if you wish, but I don't think we should leave dead-code in master simply for "guidance".
In my opinion this should be solved with documentation and communication to developers.
Comment 18•12 years ago
|
||
I just changed https://developer.mozilla.org/en-US/docs/WebAPI/Web_Activities#Activity_handler_description which didn't mention "regexp" at all. I think this is way to buried to be useful and that we should keep both in our manifest. Plus we should add a patternFlag for the browser activity.
Should we file a new bug for this ?
Comment 19•12 years ago
|
||
Keeping both in the manifests just add to the confusion. gaia-master is 1.2, there's no reason to keep old cruft there.
You need to log in
before you can comment on or make changes to this bug.
Description
•