зеркало из https://github.com/mozilla/pjs.git
fix nested folder import bug with firefox by disabling whitespace skipping
(bug 243510)
This commit is contained in:
Родитель
233f37f6dc
Коммит
9ab16be072
|
@ -722,6 +722,7 @@ static unsigned gFirstUserCollection = 0;
|
||||||
}
|
}
|
||||||
// Set up to scan the bookmark file
|
// Set up to scan the bookmark file
|
||||||
NSScanner *fileScanner = [[NSScanner alloc] initWithString:fileAsString];
|
NSScanner *fileScanner = [[NSScanner alloc] initWithString:fileAsString];
|
||||||
|
[fileScanner setCharactersToBeSkipped:nil];
|
||||||
BOOL isNetscape = YES;
|
BOOL isNetscape = YES;
|
||||||
// See if it's a netscape/IE style bookmark file, or omniweb
|
// See if it's a netscape/IE style bookmark file, or omniweb
|
||||||
NSRange aRange = [fileAsString rangeOfString:@"<!DOCTYPE NETSCAPE-Bookmark-file-1>" options:NSCaseInsensitiveSearch];
|
NSRange aRange = [fileAsString rangeOfString:@"<!DOCTYPE NETSCAPE-Bookmark-file-1>" options:NSCaseInsensitiveSearch];
|
||||||
|
@ -831,6 +832,8 @@ static unsigned gFirstUserCollection = 0;
|
||||||
[fileScanner setScanLocation:(scanIndex+1)];
|
[fileScanner setScanLocation:(scanIndex+1)];
|
||||||
}
|
}
|
||||||
else if (([tokenTag isEqualToString:@"</D"]) || ([tokenTag isEqualToString:@"</d"])) {
|
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];
|
currentArray = (BookmarkFolder *)[currentArray parent];
|
||||||
[fileScanner setScanLocation:(scanIndex+1)];
|
[fileScanner setScanLocation:(scanIndex+1)];
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче