Closed
Bug 1400200
Opened 7 years ago
Closed 7 years ago
Allow tabs.create for data URLs
Categories
(WebExtensions :: General, enhancement, P5)
Tracking
(firefox57 wontfix)
RESOLVED
DUPLICATE
of bug 1317166
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: danny0838, Unassigned)
Details
(Whiteboard: [design-decision-needed])
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170824053622
Steps to reproduce:
Run the below code in an extension page (e.g. options.html):
var url = `data:text/html;Some content`;
chrome.tabs.create({url: url});
Actual results:
The data URL page cannot be opened.
Expected results:
The data URL page should be opened.
It is unreasonable to block data URLs for tabs create since a data URL page runs in a separated domain and does not have extension privilege at all. It is also meaningless since redirecting to a data URL is allowed for chrome.webRequest and a developer can use chrome.webRequest.onBeforeRequest to redirect an arbitary url to the desired data URL if he/she really wants to.
This restriction is annoying for extensions that need to show arbitrary content to the user. This behavior is also different from Chromium and cause incompatibility for extensions/addons.
Updated•7 years ago
|
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Comment 1•7 years ago
|
||
Also see for context the intent to prevent top level navigation to data URIs:
https://groups.google.com/forum/#!topic/mozilla.dev.platform/IC8GNhA-pxk
Severity: normal → enhancement
status-firefox57:
--- → wontfix
Priority: -- → P5
Whiteboard: [design-decision-needed]
Comment 2•7 years ago
|
||
Isn't this the same as bug 1317166?
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•