From 7ebeb1d121fcf0a4066efe04d58d5f9d39bfd5ef Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Thu, 21 Sep 2000 04:25:09 +0000 Subject: [PATCH] Strip out quote character in candidate filename, b=53377, r=pnunn, sfraser git-svn-id: svn://10.0.0.236/trunk@79707 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditorShell.cpp | 4 ++++ mozilla/editor/composer/src/nsEditorShell.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index 6b089672214..4a2b04195f3 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -1822,6 +1822,10 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval) // Use page title as suggested name for new document if (fileName.Length() == 0 && title.Length() > 0) { + // Strip out quote character + PRUnichar quote = (PRUnichar)'\"'; + title.StripChar(quote); + //Replace "bad" filename characteres with "_" PRUnichar space = (PRUnichar)' '; PRUnichar dot = (PRUnichar)'.'; diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 6b089672214..4a2b04195f3 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -1822,6 +1822,10 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval) // Use page title as suggested name for new document if (fileName.Length() == 0 && title.Length() > 0) { + // Strip out quote character + PRUnichar quote = (PRUnichar)'\"'; + title.StripChar(quote); + //Replace "bad" filename characteres with "_" PRUnichar space = (PRUnichar)' '; PRUnichar dot = (PRUnichar)'.';