mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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
This commit is contained in:
parent
f3eb2b7dd8
commit
5771630720
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user