[Commits] [SCM] claws branch, master, updated. 3.11.1-98-g64e5421
ticho at claws-mail.org
ticho at claws-mail.org
Sun May 17 19:14:27 CEST 2015
The branch, master has been updated
via 64e5421bb2a0dbad5d23a6c292d84a96cb3050e2 (commit)
from 46c8c40814ef39791f264a721c29563b06976cf7 (commit)
Summary of changes:
src/plugins/rssyl/libfeed/parser_atom10.c | 3 ++-
src/plugins/rssyl/libfeed/parser_rdf.c | 3 ++-
src/plugins/rssyl/libfeed/parser_rss20.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 64e5421bb2a0dbad5d23a6c292d84a96cb3050e2
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Sun May 17 19:13:17 2015 +0200
RSSyl: Strip leading and trailing whitespace from XML tag contents.
diff --git a/src/plugins/rssyl/libfeed/parser_atom10.c b/src/plugins/rssyl/libfeed/parser_atom10.c
index f3a9e0d..9cf4ffa 100644
--- a/src/plugins/rssyl/libfeed/parser_atom10.c
+++ b/src/plugins/rssyl/libfeed/parser_atom10.c
@@ -107,7 +107,7 @@ void feed_parser_atom10_end(void *data, const gchar *el)
gchar *text = NULL, *tmp;
if( ctx->str != NULL )
- text = ctx->str->str;
+ text = g_strstrip(g_strdup(ctx->str->str));
else
text = "";
@@ -253,6 +253,7 @@ void feed_parser_atom10_end(void *data, const gchar *el)
}
if( ctx->str != NULL ) {
+ g_free(text);
g_string_free(ctx->str, TRUE);
ctx->str = NULL;
}
diff --git a/src/plugins/rssyl/libfeed/parser_rdf.c b/src/plugins/rssyl/libfeed/parser_rdf.c
index 02b80ea..d514bf0 100644
--- a/src/plugins/rssyl/libfeed/parser_rdf.c
+++ b/src/plugins/rssyl/libfeed/parser_rdf.c
@@ -57,7 +57,7 @@ void feed_parser_rdf_end(void *data, const gchar *el)
gchar *text = NULL;
if( ctx->str != NULL )
- text = ctx->str->str;
+ text = g_strstrip(g_strdup(ctx->str->str));
else
text = "";
@@ -142,6 +142,7 @@ void feed_parser_rdf_end(void *data, const gchar *el)
}
if( ctx->str != NULL ) {
+ g_free(text);
g_string_free(ctx->str, TRUE);
ctx->str = NULL;
}
diff --git a/src/plugins/rssyl/libfeed/parser_rss20.c b/src/plugins/rssyl/libfeed/parser_rss20.c
index 25cea33..1ce30ab 100644
--- a/src/plugins/rssyl/libfeed/parser_rss20.c
+++ b/src/plugins/rssyl/libfeed/parser_rss20.c
@@ -80,7 +80,7 @@ void feed_parser_rss20_end(void *data, const gchar *el)
gchar *text = NULL;
if( ctx->str != NULL )
- text = ctx->str->str;
+ text = g_strstrip(g_strdup(ctx->str->str));
else
text = "";
@@ -174,6 +174,7 @@ void feed_parser_rss20_end(void *data, const gchar *el)
}
if( ctx->str != NULL ) {
+ g_free(text);
g_string_free(ctx->str, TRUE);
ctx->str = NULL;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list