Bug 1623222 - Remove the charset parameter from nsITextToSubURI::UnEscapeURIForUI. r=hsivonen

Only 3 callers are using a non-UTF-8 charset as the first parameter.
* MediaDocument.cpp: This does not make sense because the "filename" part of
  URLs will always be encoded with UTF-8.
* nsContextMenu.js: This is wrong because "mailto:" URLs don't care about the
  document charset.
* Finder.jsm: This caused bug 1623222.

Differential Revision: https://phabricator.services.mozilla.com/D67386
This commit is contained in:
Masatoshi Kimura
2020-03-19 10:45:28 +00:00
parent f4007c7525
commit 7355e130aa
16 changed files with 21 additions and 54 deletions

View File

@@ -5018,7 +5018,7 @@ var XULBrowserWindow = {
setOverLink(url) {
if (url) {
url = Services.textToSubURI.unEscapeURIForUI("UTF-8", url);
url = Services.textToSubURI.unEscapeURIForUI(url);
// Encode bidirectional formatting characters.
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)