[Xfce4-commits] <midori:master> Correctly skip link items if there is no |

Christian Dywan noreply at xfce.org
Sun Mar 11 21:40:01 CET 2012


Updating branch refs/heads/master
         to c6bdd62f671e597cc3a125c235c9ddd733861942 (commit)
       from 7066679bcf97320abe401fc237b5ee24cd812930 (commit)

commit c6bdd62f671e597cc3a125c235c9ddd733861942
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Mar 11 21:38:02 2012 +0100

    Correctly skip link items if there is no |
    
    Parsing will still ignore items containing a , anywhere.

 midori/midori-view.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 4fab027..eeaf13d 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -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);


More information about the Xfce4-commits mailing list