Closed Bug 1782364 Opened 2 months ago Closed 2 months ago

File URL should be decoded in devtools UI

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: tophf, Assigned: ochameau)

Details

Attachments

(2 files)

Attached file test.html
  1. open the attached test.html
  2. open devtools -> Debugger -> Sources
  3. expand foo://

What happened?

URL is garbled: æå­ã³ã¼ã.js

What should have happened?

URL is readable: 文字コード.js

Anything else we should know?

SourcesTreeItem.js in Firefox's devtools uses unescape which doesn't decode URLs. It was added in FF67 AFAICS: https://hg.mozilla.org/integration/mozilla-inbound/rev/6b5b546aac14

decodeURI or decodeURIComponent should be used instead, arguably, but it can throw on invalid characters, so unescape should be used as a fallback.

Hi Tophf,
Thanks for filling this issue.

I can reproduce the issue in Firefox 103. But it looks like its fixed in the Latest Nightly (Firefox 105).

Could you try out the latest firefox nightly?

Thanks

Flags: needinfo?(tophf)

Indeed it's fixed in 105, thanks.

Flags: needinfo?(tophf)

Thanks for confirming! i'll close this.

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED

This at least ensure that the sources display with the right display in the Source Tree.

Assignee: nobody → poirot.alex

Reopening to add some test to ensure not regressing this.

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e9bd0a704230
[devtools] Test files with encoded characters in the debugger. r=bomsy
Status: REOPENED → RESOLVED
Closed: 2 months ago2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.