From 17d2fdcdc1925ce4a53977583d4b34011fbb905c Mon Sep 17 00:00:00 2001 From: "darin%netscape.com" Date: Thu, 11 Apr 2002 23:18:34 +0000 Subject: [PATCH] fixes bug 130079 "Importing IE favorites turns spaces into %20 (URL-encoded)" patch=andreas.otte@debitel.net r=ben sr=darin git-svn-id: svn://10.0.0.236/trunk@118810 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xpfe/components/bookmarks/src/nsBookmarksService.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp index 4bcdd597f09..03432e5b89a 100644 --- a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp +++ b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp @@ -24,6 +24,7 @@ * Chris Waterson * David Hyatt * Ben Goodger + * Andreas Otte * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -3276,7 +3277,12 @@ nsBookmarksService::ParseFavoritesFolder(nsIFile* aDirectory, nsIRDFResource* aP nsCAutoString baseName; fileURL->GetFileBaseName(baseName); - NS_ConvertUTF8toUCS2 bookmarkName(baseName); + + // convert baseName to UCS-2 w/ ASCII chars unescaped; + // non-ASCII escaped chars remain escaped. + nsCAutoString buf; + NS_ConvertUTF8toUCS2 bookmarkName( + NS_UnescapeURL(baseName, esc_OnlyASCII, buf)); nsCOMPtr bookmark; rv = CreateBookmark(bookmarkName.get(), url.get(), aParentResource, getter_AddRefs(bookmark));