changeset 24062:f1ead28fcc5a

When receiving an <img/> without the "alt" attribute, set the "cid" including the "cid:" uri specifier to avoid auto-linkification in gtkimhtml
author Marcus Lundblad <ml@update.uu.se>
date Thu, 11 Sep 2008 18:22:12 +0000
parents fba7c73c8f02
children 463240455f55
files libpurple/protocols/jabber/message.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/message.c	Mon Sep 08 20:48:16 2008 +0000
+++ b/libpurple/protocols/jabber/message.c	Thu Sep 11 18:22:12 2008 +0000
@@ -343,11 +343,12 @@
 				JabberSmileyRef *ref = g_new0(JabberSmileyRef, 1);
 				const gchar *alt = xmlnode_get_attrib(child, "alt");
 				ref->cid = temp_cid;
-				/* if there is no "alt" string, use the cid... */
+				/* if there is no "alt" string, use the cid... 
+				 include the entire src, eg. "cid:.." to avoid linkification */
 				if (alt && alt[0] != '\0') {
 					ref->alt = g_strdup(xmlnode_get_attrib(child, "alt"));
 				} else {
-					ref->alt = g_strdup(cid);
+					ref->alt = g_strdup(src);
 				}
 				g_hash_table_insert(table, temp_cid, ref);
 			}
@@ -427,7 +428,7 @@
 					out = g_string_append(out, escaped);
 					g_free(escaped);
 				} else {
-					out = g_string_append(out, src + 4);
+					out = g_string_append(out, src);
 				}
 				pos += pos2 - pos;
 			} else {