Open Bug 1538190 Opened 6 years ago Updated 6 months ago

Scripts added to iframe via blob URL don't run from local file system

Categories

(Core :: DOM: HTML Parser, defect, P3)

66 Branch
x86_64
Windows 10
defect

Tracking

()

Tracking Status
firefox-esr60 --- unaffected
firefox66 --- wontfix
firefox67 --- fix-optional
firefox68 --- fix-optional

People

(Reporter: alice0775, Unassigned, NeedInfo)

References

Details

(Keywords: nightly-community, regression)

Attachments

(1 file)

Attached file testcase.html

+++ This bug was initially created as a clone of Bug #1538082 +++

Loading the html from http works as expected.
However loading the html from file: will fail.

Steps to reproduce:

  1. Save the attached html to local file
  2. Open it

Actual Results:
Nothing is displayed.
And an error shows in Browser Console:
Loading failed for the module with source “blob:null/f3df8bca-0453-4099-b54b-3b1f131f90ac"

Expected Results:
1234 is displayed

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=8917a7a6d54fee4a13cc9229380e148615b22779&tochange=5a6f372f62c150b9263a1a59377a352284b35114

Expected results:

The output pane of the jsfiddle should show 1234.

This works correctly in Safari and Chrome.

It also appears to work correctly in FireFox if you do it outside an iframe: https://jsfiddle.net/ejdh87z3/1/

Has Regression Range: --- → yes
Has STR: --- → yes

ok, so this is similar to bug 1538082, but exactly the same.

Flags: needinfo?(jcoppeard)
Priority: -- → P3

When loaded from Bugzilla or from file: before bug 1071816, the character encoding is windows-1252. After bug 1071816 from a file: URL, it's UTF-8. However, the test case is ASCII and the Blob constructor shouldn't look at the encoding of the document, so I have no idea why bug 1071816 would change what's happening here.

(In reply to Henri Sivonen (:hsivonen) from comment #2)

When loaded from Bugzilla or from file: before bug 1071816, the character encoding is windows-1252. After bug 1071816 from a file: URL, it's UTF-8. However, the test case is ASCII and the Blob constructor shouldn't look at the encoding of the document, so I have no idea why bug 1071816 would change what's happening here.

UTF-8 isn't the problem. If I add the UTF-8 BOM, the test case works.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: