fix nested folder import bug with firefox by disabling whitespace skipping

(bug 243510)
This commit is contained in:
pinkerton%aol.net 2004-09-02 20:21:40 +00:00
parent e599382223
commit c7097822c9

View File

@ -722,6 +722,7 @@ static unsigned gFirstUserCollection = 0;
}
// Set up to scan the bookmark file
NSScanner *fileScanner = [[NSScanner alloc] initWithString:fileAsString];
[fileScanner setCharactersToBeSkipped:nil];
BOOL isNetscape = YES;
// See if it's a netscape/IE style bookmark file, or omniweb
NSRange aRange = [fileAsString rangeOfString:@"<!DOCTYPE NETSCAPE-Bookmark-file-1>" options:NSCaseInsensitiveSearch];
@ -831,6 +832,8 @@ static unsigned gFirstUserCollection = 0;
[fileScanner setScanLocation:(scanIndex+1)];
}
else if (([tokenTag isEqualToString:@"</D"]) || ([tokenTag isEqualToString:@"</d"])) {
// note that we only scan for the first two characters of a tag
// that is why this tag is "</D" and not "</DL"
currentArray = (BookmarkFolder *)[currentArray parent];
[fileScanner setScanLocation:(scanIndex+1)];
}