]> spindle.queued.net Git - midori/commitdiff
Correctly skip link items if there is no |
authorChristian Dywan <christian@twotoasts.de>
Sun, 11 Mar 2012 20:38:02 +0000 (21:38 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 11 Mar 2012 20:38:02 +0000 (21:38 +0100)
Parsing will still ignore items containing a , anywhere.

midori/midori-view.c

index 4fab0270033ddaeb69411adfdda43f23b8250a15..eeaf13d95023259afbf008ddededef80f47360d0 100644 (file)
@@ -1488,6 +1488,7 @@ webkit_web_view_load_finished_cb (WebKitWebView*  web_view,
         "} return f; })("
         "document.getElementsByTagName ('link'));", NULL);
 
+        /* FIXME: If URI or title contains , parsing will break */
         gchar** items = g_strsplit (value, ",", 0);
         gchar** current_item = items;
         gchar* default_uri = NULL;
@@ -1511,7 +1512,7 @@ webkit_web_view_load_finished_cb (WebKitWebView*  web_view,
                     continue;
                 title = strchr (uri_and_title, '|');
                 if (title == NULL)
-                    continue;
+                    goto news_feeds_continue;
                 title++;
 
                 uri = g_strndup (uri_and_title, title - 1 - uri_and_title);
@@ -1529,6 +1530,7 @@ webkit_web_view_load_finished_cb (WebKitWebView*  web_view,
                 katze_assign (view->icon_uri, g_strdup (uri_and_title));
             #endif
 
+            news_feeds_continue:
             current_item++;
         }
         g_strfreev (items);