[evolution-rss] Bug 661320 - HTML format remove image when send it
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] Bug 661320 - HTML format remove image when send it
- Date: Sun, 9 Oct 2011 15:35:14 +0000 (UTC)
commit c3e9b843360a8c68ed0fbca14ea2e449692304c6
Author: Lucian Langa <lucilanga gnome org>
Date: Sun Oct 9 17:34:52 2011 +0200
Bug 661320 - HTML format remove image when send it
TODO | 1 +
src/parser.c | 14 +++++++-------
src/rss.c | 5 +++--
3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/TODO b/TODO
index e1674b0..93fa31a 100644
--- a/TODO
+++ b/TODO
@@ -44,3 +44,4 @@
* add evolution-rss.desktop file to integrate into browsers
* remove useless validation option
* checkbox - autodisable broken feeds - apply dyn penalty
+ * fix loading images before send (in preview mode)
diff --git a/src/parser.c b/src/parser.c
index 4d19ab4..91484a5 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -76,14 +76,14 @@ rss_html_url_decode(const char *html, int len)
while ((doc = (xmlDoc *)html_find((xmlNode *)doc, (gchar *)"img"))) {
if ((url = (gchar *)xmlGetProp((xmlNodePtr)doc, (xmlChar *)"src"))) {
if (strstr(url, "img:")) {
- gchar *tmp = decode_image_cache_filename(url);
- duri = g_strconcat("file://", tmp, NULL);
- g_free(tmp);
+ gchar *tmp = decode_image_cache_filename(url);
+ duri = g_strconcat("file://", tmp, NULL);
+ g_free(tmp);
+ xmlSetProp(
+ (xmlNodePtr)doc,
+ (xmlChar *)"src",
+ (xmlChar *)duri);
}
- xmlSetProp(
- (xmlNodePtr)doc,
- (xmlChar *)"src",
- (xmlChar *)duri);
xmlFree(url);
}
}
diff --git a/src/rss.c b/src/rss.c
index 33e957f..68f42f6 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -2147,9 +2147,10 @@ org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
if (doc) {
htmlDocDumpMemory(doc, &buff, &size);
xmlFree(doc);
- }
+ gtkhtml_editor_set_text_html((GtkhtmlEditor *)t->composer, (gchar *)buff, size);
+ } else
+ gtkhtml_editor_set_text_html((GtkhtmlEditor *)t->composer, (gchar *)text, length);
- gtkhtml_editor_set_text_html((GtkhtmlEditor *)t->composer, (gchar *)buff, size);
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]