diff options
author | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2009-01-05 05:01:27 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2009-01-05 05:01:27 +0800 |
commit | 24846874890f85338b4e2d8ba982f93c37814100 (patch) | |
tree | 9add4daa3945d219408f14651881e4723b647294 /src/bookmarks | |
parent | d6ae4ff301ba122569cff4a1ab6928f56a8aaac7 (diff) | |
download | gsoc2013-epiphany-24846874890f85338b4e2d8ba982f93c37814100.tar gsoc2013-epiphany-24846874890f85338b4e2d8ba982f93c37814100.tar.gz gsoc2013-epiphany-24846874890f85338b4e2d8ba982f93c37814100.tar.bz2 gsoc2013-epiphany-24846874890f85338b4e2d8ba982f93c37814100.tar.lz gsoc2013-epiphany-24846874890f85338b4e2d8ba982f93c37814100.tar.xz gsoc2013-epiphany-24846874890f85338b4e2d8ba982f93c37814100.tar.zst gsoc2013-epiphany-24846874890f85338b4e2d8ba982f93c37814100.zip |
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=/branches/gnome-2-24/; revision=8669
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-import.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c index 412223a6f..a87b5ed02 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 ("<a href=\"(?P<url>\\w.*)\".*>(?P<name>\\w.*)</a>", - G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY, NULL); + regex = g_regex_new + ("<a href=\"(?P<url>[^\"]*).*?>\\s*(?P<name>.*?)\\s*</a>", + 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) |