Closed Bug 1378875 Opened 8 years ago Closed 8 years ago

Extension generated data URI cannot run inline javascript

Categories

(WebExtensions :: General, defect)

53 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1324406

People

(Reporter: danny0838, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170518000419 Steps to reproduce: Run the below code in an extension page (e.g. options.html): function stringToDataURI(str, mime, charset) { return 'data:' + mime + (charset ? ';charset=' + charset : "") + ',' + encodeURIComponent(str); } var content = '<script>alert("Hello world");</script>'; var url = stringToDataURI(content, "text/html", "UTF-8"); window.open(url); Actual results: The alert does not run. Expected results: The alert inside the data URI should run.
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.