Closed
Bug 1644694
Opened 6 years ago
Closed 6 years ago
Do not call mozilla::dom::FallbackEncoding::FromLocale() in nsIndexedToHTML.cpp
Categories
(Core :: Networking: File, task, P2)
Core
Networking: File
Tracking
()
RESOLVED
FIXED
mozilla79
| Tracking | Status | |
|---|---|---|
| firefox79 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
nsIndexedToHTML.cpp has this bit of code:
// unescape may fail because
// 1. file URL may be encoded in platform charset for backward compatibility
// 2. query part may not be encoded in UTF-8 (see bug 261929)
// so try the platform's default if this is file url
if (NS_FAILED(rv) && uri->SchemeIs("file") && !NS_IsNativeUTF8()) {
auto encoding = mozilla::dom::FallbackEncoding::FromLocale();
nsAutoCString charset;
encoding->Name(charset);
rv = mTextToSubURI->UnEscapeAndConvert(charset, titleUri, unEscapeSpec);
}
The only platform where NS_IsNativeUTF8() returns false is Windows, which supports both UTF-8 file; URLs and legacy "ANSI" codepage file: URLs. However, our own directory listing code appears to always generate UTF-8 file: URLs, so it should be OK to remove this block.
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
Updated•6 years ago
|
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a644e527a77f
Do not call mozilla::dom::FallbackEncoding::FromLocale() in nsIndexedToHTML.cpp. r=valentin
Comment 4•6 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox79:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in
before you can comment on or make changes to this bug.
Description
•