decode HTML-encoded bookmark names

svn path=/trunk/; revision=11749
This commit is contained in:
Martin Fuchs 2004-11-21 15:35:15 +00:00
parent 4e66d23d42
commit 7ce0322c85
2 changed files with 8 additions and 8 deletions

View file

@ -19,7 +19,7 @@ CFLAGS += -D_DEBUG -g
RCFLAGS += -D_DEBUG RCFLAGS += -D_DEBUG
LFLAGS += -g LFLAGS += -g
else else
CFLAGS += -DNDEBUG -Os CFLAGS += -DNDEBUG -Os -march=pentium4
RCFLAGS += -DNDEBUG RCFLAGS += -DNDEBUG
LFLAGS += -s LFLAGS += -s
endif endif

View file

@ -88,12 +88,12 @@ bool Bookmark::read(const_XMLPos& pos)
_url = pos.get("href").c_str(); _url = pos.get("href").c_str();
if (pos.go_down("title")) { if (pos.go_down("title")) {
_name = pos->get_content().c_str(); _name = pos->get_content();
pos.back(); pos.back();
} }
if (pos.go_down("desc")) { if (pos.go_down("desc")) {
_description = pos->get_content().c_str(); _description = pos->get_content();
pos.back(); pos.back();
} }
@ -160,19 +160,19 @@ void Bookmark::write(XMLPos& pos) const
void BookmarkFolder::read(const_XMLPos& pos) void BookmarkFolder::read(const_XMLPos& pos)
{ {
if (pos.go_down("title")) { if (pos.go_down("title")) {
_name = pos->get_content().c_str(); _name = pos->get_content();
pos.back(); pos.back();
} }
if (pos.go_down("desc")) { if (pos.go_down("desc")) {
_description = pos->get_content().c_str(); _description = pos->get_content();
pos.back(); pos.back();
} }
_bookmarks.read(pos); _bookmarks.read(pos);
} }
/// write bookmark folder conten from XBEL formated XML tree /// write bookmark folder content from XBEL formated XML tree
void BookmarkFolder::write(XMLPos& pos) const void BookmarkFolder::write(XMLPos& pos) const
{ {
pos.create("folder"); pos.create("folder");
@ -389,7 +389,7 @@ void BookmarkList::import_IE_favorites(ShellDirectory& dir, HWND hwnd)
if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
BookmarkFolder new_folder; BookmarkFolder new_folder;
new_folder._name = name; new_folder._name = DecodeXMLString(name);
if (entry->_etype == ET_SHELL) { if (entry->_etype == ET_SHELL) {
ShellDirectory new_dir(dir._folder, static_cast<ShellEntry*>(entry)->_pidl, hwnd); ShellDirectory new_dir(dir._folder, static_cast<ShellEntry*>(entry)->_pidl, hwnd);
@ -404,7 +404,7 @@ void BookmarkList::import_IE_favorites(ShellDirectory& dir, HWND hwnd)
} else { } else {
Bookmark bookmark; Bookmark bookmark;
bookmark._name = name; bookmark._name = DecodeXMLString(name);
entry->get_path(path); entry->get_path(path);
_tsplitpath(path, NULL, NULL, NULL, ext); _tsplitpath(path, NULL, NULL, NULL, ext);