summaryrefslogtreecommitdiffstats
path: root/uriloader
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-29 14:30:24 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-29 14:30:24 +0000
commita1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57 (patch)
tree9df45decf2d7d940ff19641adea50fe7122805f7 /uriloader
parent86b184b957ea2ce31e5ffc376e90cbc537963367 (diff)
parent2ee2ca7dfb0913eef79708dc4100f87b9557e128 (diff)
downloadUXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar
UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar.gz
UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar.lz
UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar.xz
UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.zip
Merge branch 'redwood' into release
Diffstat (limited to 'uriloader')
-rw-r--r--uriloader/exthandler/nsExternalHelperAppService.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
index 49a54ea5f..0ca3d7edf 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1181,9 +1181,12 @@ nsExternalAppHandler::nsExternalAppHandler(nsIMIMEInfo * aMIMEInfo,
mTempFileExtension = char16_t('.');
AppendUTF8toUTF16(aTempFileExtension, mTempFileExtension);
- // replace platform specific path separator and illegal characters to avoid any confusion
- mSuggestedFileName.ReplaceChar(KNOWN_PATH_SEPARATORS FILE_ILLEGAL_CHARACTERS, '_');
- mTempFileExtension.ReplaceChar(KNOWN_PATH_SEPARATORS FILE_ILLEGAL_CHARACTERS, '_');
+ // Replace platform specific path separator and illegal characters to avoid any confusion
+ mSuggestedFileName.ReplaceChar(KNOWN_PATH_SEPARATORS, '_');
+ mSuggestedFileName.ReplaceChar(FILE_ILLEGAL_CHARACTERS, ' ');
+ mSuggestedFileName.ReplaceChar(char16_t(0), '_');
+ mTempFileExtension.ReplaceChar(KNOWN_PATH_SEPARATORS, '_');
+ mTempFileExtension.ReplaceChar(FILE_ILLEGAL_CHARACTERS, ' ');
// Remove unsafe bidi characters which might have spoofing implications (bug 511521).
const char16_t unsafeBidiCharacters[] = {