Use the new ReplaceChars with char16_t array. Bug 979556, r=bsmedberg

This commit is contained in:
Simon Montagu 2014-03-05 21:04:36 +02:00
parent a0be4ca960
commit 755000e10d

View File

@ -1254,12 +1254,11 @@ nsExternalAppHandler::nsExternalAppHandler(nsIMIMEInfo * aMIMEInfo,
char16_t(0x2066), // Left-to-Right Isolate
char16_t(0x2067), // Right-to-Left Isolate
char16_t(0x2068), // First Strong Isolate
char16_t(0x2069) // Pop Directional Isolate
char16_t(0x2069), // Pop Directional Isolate
char16_t(0)
};
for (uint32_t i = 0; i < ArrayLength(unsafeBidiCharacters); ++i) {
mSuggestedFileName.ReplaceChar(unsafeBidiCharacters[i], '_');
mTempFileExtension.ReplaceChar(unsafeBidiCharacters[i], '_');
}
mSuggestedFileName.ReplaceChar(unsafeBidiCharacters, '_');
mTempFileExtension.ReplaceChar(unsafeBidiCharacters, '_');
// Make sure extension is correct.
EnsureSuggestedFileName();