From 2dd2cfc161aef09fc1310ea9750e948596b943ba Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Sun, 4 Jan 2009 21:00:39 +0000 Subject: Fix bookmark import of ff3 files ff3 now has some extra stuff in their .html files, so the importer is not always working, the regexp has been improved to fix this. Patch by Wouter Bolsterlee. Fixes bug #552997. svn path=/trunk/; revision=8668 --- src/bookmarks/ephy-bookmarks-import.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c index 272026f84..0215c5d0e 100644 --- a/src/bookmarks/ephy-bookmarks-import.c +++ b/src/bookmarks/ephy-bookmarks-import.c @@ -550,8 +550,9 @@ ns_get_bookmark_item (FILE *f, GString *name, GString *url) */ /* check if it's a bookmark */ - regex = g_regex_new ("\\w.*)\".*>(?P\\w.*)", - G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY, NULL); + regex = g_regex_new + ("[^\"]*).*?>\\s*(?P.*?)\\s*", + G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY, NULL); g_regex_match (regex, line, 0, &match_info); if (g_match_info_matches (match_info)) @@ -595,7 +596,7 @@ ns_get_bookmark_item (FILE *f, GString *name, GString *url) * @regex. Note that this two free/unrefs correspond to the last * if() block too. */ - g_match_info_free (match_info); + g_match_info_free (match_info); g_regex_unref (regex); if (match_name) -- cgit v1.2.3