mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Fix bug # 47336: files with question marks. r=me
This commit is contained in:
parent
ea5d41851a
commit
781a0712bc
@ -1186,7 +1186,8 @@ FileSystemDataSource::GetFolderList(nsIRDFResource *source, PRBool allowHidden,
|
||||
leafStr = nsnull;
|
||||
|
||||
// we need to escape this leaf name;
|
||||
// for now, let's just hack it and encode spaces and slashes
|
||||
// for now, let's just hack it and encode
|
||||
// spaces, slashes and question marks
|
||||
PRInt32 aOffset;
|
||||
while ((aOffset = leaf.FindChar(' ')) >= 0)
|
||||
{
|
||||
@ -1198,6 +1199,11 @@ FileSystemDataSource::GetFolderList(nsIRDFResource *source, PRBool allowHidden,
|
||||
leaf.Cut((PRUint32)aOffset, 1);
|
||||
leaf.Insert("%2F", (PRUint32)aOffset);
|
||||
}
|
||||
while ((aOffset = leaf.FindChar('?')) >= 0)
|
||||
{
|
||||
leaf.Cut((PRUint32)aOffset, 1);
|
||||
leaf.Insert("%3F", (PRUint32)aOffset);
|
||||
}
|
||||
|
||||
// append the encoded name
|
||||
fullURI.Append(leaf);
|
||||
|
Loading…
Reference in New Issue
Block a user