aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@src.gnome.org>2009-01-05 05:00:39 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2009-01-05 05:00:39 +0800
commit2dd2cfc161aef09fc1310ea9750e948596b943ba (patch)
treef32e8a77c36f745df96b36a54e14559b9edfdf40 /src
parentfd926659f931d4aa7099aa2c3081d0745685ab09 (diff)
downloadgsoc2013-epiphany-2dd2cfc161aef09fc1310ea9750e948596b943ba.tar
gsoc2013-epiphany-2dd2cfc161aef09fc1310ea9750e948596b943ba.tar.gz
gsoc2013-epiphany-2dd2cfc161aef09fc1310ea9750e948596b943ba.tar.bz2
gsoc2013-epiphany-2dd2cfc161aef09fc1310ea9750e948596b943ba.tar.lz
gsoc2013-epiphany-2dd2cfc161aef09fc1310ea9750e948596b943ba.tar.xz
gsoc2013-epiphany-2dd2cfc161aef09fc1310ea9750e948596b943ba.tar.zst
gsoc2013-epiphany-2dd2cfc161aef09fc1310ea9750e948596b943ba.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=/trunk/; revision=8668
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c7
1 files 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 ("<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)