~ubuntu-branches/debian/sid/claws-mail/sid

« back to all changes in this revision

Viewing changes to src/plugins/rssyl/libfeed/parser_rdf.c

  • Committer: Package Import Robot
  • Author(s): Ricardo Mones
  • Date: 2015-08-18 16:37:25 UTC
  • mfrom: (1.3.7)
  • Revision ID: package-import@ubuntu.com-20150818163725-1it32n9mzqkwy2ef
Tags: 3.12.0-1
* New upstream release:
- 'cannot reorganize mailboxes' (Closes: #777208)
- 'dropdown menu bar has disappeared…'(Closes: #778886)
- 'depends on plugins libraries'  (Closes: #779824)
- 'new upstream version (3.12.0)…' (Closes: #793665)
* 14CVE_2010_5109.patch, 15fix_crash_open_folder.patch,
  13desktop_file_categories.patch
- Remove patches applied upstream
* debian/control, debian/copyright, debian/claws-mail-managesieve*
- Add managesieve plugin (new in this release)
* debian/rules
- Set perl-plugin manpage release version automatically
* 12fix_manpage_header.patch
- Update patch to cope with upstream changes
* debian/control, debian/watch
- Update VCS-* and watch URLs (thanks Julian Wollrath)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <expat.h>
23
23
#include <string.h>
24
24
 
 
25
#include <procheader.h>
 
26
 
25
27
#include "feed.h"
26
28
#include "date.h"
27
29
#include "parser_rdf.h"
28
30
 
 
31
enum {
 
32
        FEED_LOC_RDF_NONE,
 
33
        FEED_LOC_RDF_CHANNEL,
 
34
        FEED_LOC_RDF_ITEM
 
35
} FeedRdfLocations;
 
36
 
29
37
void feed_parser_rdf_start(void *data, const gchar *el, const gchar **attr)
30
38
{
31
39
        FeedParserCtx *ctx = (FeedParserCtx *)data;
55
63
        gchar *text = NULL;
56
64
 
57
65
        if( ctx->str != NULL )
58
 
                text = ctx->str->str;
 
66
                text = g_strstrip(g_strdup(ctx->str->str));
59
67
        else
60
68
                text = "";
61
69
 
102
110
                                        } else if( !strcmp(el, "dc:creator") ) {
103
111
                                                FILL(feed->author)
104
112
                                        } else if( !strcmp(el, "dc:date") ) {
105
 
                                                feed->date = parseISO8601Date(text);
 
113
                                                feed->date = procheader_date_parse(NULL, text, 0);
106
114
                                        } else if( !strcmp(el, "pubDate") ) {
107
 
                                                feed->date = parseRFC822Date(text);
 
115
                                                feed->date = procheader_date_parse(NULL, text, 0);
108
116
                                        }
109
117
 
110
118
                                        break;
127
135
                                        } else if( !strcmp(el, "link") ) {
128
136
                                                FILL(ctx->curitem->url)
129
137
                                        } else if( !strcmp(el, "dc:date") ) {
130
 
                                                ctx->curitem->date_modified = parseISO8601Date(text);
 
138
                                                ctx->curitem->date_modified = procheader_date_parse(NULL, text, 0);
131
139
                                        } else if( !strcmp(el, "pubDate") ) {
132
 
                                                ctx->curitem->date_modified = parseRFC822Date(text);
 
140
                                                ctx->curitem->date_modified = procheader_date_parse(NULL, text, 0);
133
141
                                        }
134
142
 
135
143
                                        break;
140
148
        }
141
149
 
142
150
        if( ctx->str != NULL ) {
 
151
                g_free(text);
143
152
                g_string_free(ctx->str, TRUE);
144
153
                ctx->str = NULL;
145
154
        }