fix for bug 161352 - URL: can't load local file with semicolon (;) in name,r=dougt@netscape.com,sr=darin@netscape.com,a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@132129 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -89,6 +89,10 @@ net_GetURLSpecFromFile(nsIFile *aFile, nsACString &aURL)
|
||||
// need encoding; use %2F which is a forward slash
|
||||
escPath.ReplaceSubstring(":", "%2F");
|
||||
|
||||
// esc_Directory does not escape the semicolons, so if a filename
|
||||
// contains semicolons we need to manually escape them.
|
||||
escPath.ReplaceSubstring(";", "%3b");
|
||||
|
||||
escPath.Insert(prefix, 0);
|
||||
|
||||
// XXX this should be unnecessary
|
||||
|
||||
@@ -78,6 +78,10 @@ net_GetURLSpecFromFile(nsIFile *aFile, nsACString &result)
|
||||
else
|
||||
escPath.Assign(prefix + ePath);
|
||||
|
||||
// esc_Directory does not escape the semicolons, so if a filename
|
||||
// contains semicolons we need to manually escape them.
|
||||
escPath.ReplaceSubstring(";", "%3b");
|
||||
|
||||
// XXX this should be unnecessary
|
||||
if (escPath[escPath.Length() - 1] != '/') {
|
||||
PRBool dir;
|
||||
|
||||
@@ -61,6 +61,10 @@ net_GetURLSpecFromFile(nsIFile *aFile, nsACString &result)
|
||||
else
|
||||
escPath.Assign(prefix + ePath);
|
||||
|
||||
// esc_Directory does not escape the semicolons, so if a filename
|
||||
// contains semicolons we need to manually escape them.
|
||||
escPath.ReplaceSubstring(";", "%3b");
|
||||
|
||||
// XXX this should be unnecessary
|
||||
if (escPath[escPath.Length() - 1] != '/') {
|
||||
PRBool dir;
|
||||
|
||||
@@ -74,6 +74,10 @@ net_GetURLSpecFromFile(nsIFile *aFile, nsACString &result)
|
||||
else
|
||||
escPath.Assign(prefix + ePath);
|
||||
|
||||
// esc_Directory does not escape the semicolons, so if a filename
|
||||
// contains semicolons we need to manually escape them.
|
||||
escPath.ReplaceSubstring(";", "%3b");
|
||||
|
||||
// XXX this should be unnecessary
|
||||
if (escPath[escPath.Length() - 1] != '/') {
|
||||
PRBool dir;
|
||||
|
||||
Reference in New Issue
Block a user