~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/parsers/pie_entry.c

  • Committer: Package Import Robot
  • Author(s): Moray Allan, Bojo42, Rodrigo Gallardo, Moray Allan
  • Date: 2012-03-27 21:44:42 UTC
  • mfrom: (1.5.1)
  • mto: (3.3.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: package-import@ubuntu.com-20120327214442-g0xfh714cdmsbnts
Tags: 1.8.3-0.1
[ Bojo42 ]
* Non-maintainer upload.
* New upstream release (Closes: #502307, #623619, #631778, #651913) 
* debian/patches:
  - drop libnotify0.7 as in upstream
  - debian-example-feeds: update, move planets from "News" to "Open Source"
  - www-browser: update due to new file location
  - libtool-dont-rearange-as-needed: rebase
* debian/control:
  - update Standards-Version
  - remove obsolete Build-Depends:
    - quilt not needed for "3.0 (quilt)" source format
    - libnm-glib-dev & libdbus-glib-1-dev: upstream switched to GDBus
    - liblua5.1-0-dev: LUA scripting support got dropped
  - new Build-Depends on libunique-dev, libjson-glib-dev & dh_autoreconf
  - update version dependencies
* debian/rules: run dh_autoreconf & update translations
* debian/liferea.install: nothing to ship from /usr/lib/liferea

[ Rodrigo Gallardo ]
* Lintian love:
  - debian/control: switch from Conflicts to Breaks
  - debian/rules: redo build targets

[ Moray Allan ]
* debian/copyright: update to include additional copyright owners.
* debian/patches/www-browser: also set default external browser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * @file pie_entry.c  Atom0.3 entry parsing 
3
3
 *
4
 
 * Copyright (C) 2003-2008 Lars Lindner <lars.lindner@gmail.com>
 
4
 * Copyright (C) 2003-2009 Lars Lindner <lars.lindner@gmail.com>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
24
24
#include <libxml/parser.h>
25
25
 
26
26
#include "common.h"
 
27
#include "date.h"
27
28
#include "feed_parser.h"
28
29
#include "pie_entry.h"
29
30
#include "pie_feed.h"
82
83
                                g_free(tmp2);
83
84
                        } else {
84
85
                                /* 0.2 link : element content is the link, or non-alternate link in 0.3 */
85
 
                                if(NULL != (tmp = common_utf8_fix((gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1)))) {
 
86
                                if(NULL != (tmp = (gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1))) {
86
87
                                        item_set_source(ctxt->item, tmp);
87
88
                                        g_free(tmp);
88
89
                                }
98
99
                        ctxt->item->metadata = metadata_list_append(ctxt->item->metadata, "contributor", tmp);
99
100
                        g_free(tmp);
100
101
                } else if(!xmlStrcmp(cur->name, BAD_CAST"id")) {
101
 
                        if(NULL != (tmp = common_utf8_fix((gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1)))) {
 
102
                        if(NULL != (tmp = (gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1))) {
102
103
                                item_set_id(ctxt->item, tmp);
103
104
                                g_free(tmp);
104
105
                        }
105
106
                } else if(!xmlStrcmp(cur->name, BAD_CAST"issued")) {
106
107
                        /* FIXME: is <modified> or <issued> or <created> the time tag we want to display? */
107
 
                        if(NULL != (tmp = common_utf8_fix((gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1)))) {
108
 
                                ctxt->item->time = parseISO8601Date(tmp);
 
108
                        if(NULL != (tmp = (gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1))) {
 
109
                                ctxt->item->time = date_parse_ISO8601 (tmp);
109
110
                                g_free(tmp);
110
111
                        }
111
112
                } else if(!xmlStrcmp(cur->name, BAD_CAST"content")) {
112
113
                        /* <content> support */
113
 
                        if(NULL != (tmp = common_utf8_fix(pie_parse_content_construct(cur)))) {
 
114
                        if(NULL != (tmp = pie_parse_content_construct(cur))) {
114
115
                                item_set_description(ctxt->item, tmp);
115
116
                                g_free(tmp);
116
117
                        }
118
119
                        /* <summary> can be used for short text descriptions, if there is no
119
120
                           <content> description we show the <summary> content */
120
121
                        if(!item_get_description(ctxt->item)) {
121
 
                                if(NULL != (tmp = common_utf8_fix(pie_parse_content_construct(cur)))) {
 
122
                                if(NULL != (tmp = pie_parse_content_construct(cur))) {
122
123
                                        item_set_description(ctxt->item, tmp);
123
124
                                        g_free(tmp);
124
125
                                }
125
126
                        }
126
127
                } else if(!xmlStrcmp(cur->name, BAD_CAST"copyright")) {
127
 
                        if(NULL != (tmp = common_utf8_fix((gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1)))) {
 
128
                        if(NULL != (tmp = (gchar *)xmlNodeListGetString(ctxt->doc, cur->xmlChildrenNode, 1))) {
128
129
                                ctxt->item->metadata = metadata_list_append(ctxt->item->metadata, "copyright", tmp);
129
130
                                g_free(tmp);
130
131
                        }