diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index 0f7400f..6e2570a 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -74,6 +74,14 @@ typedef struct {
 
 static void chat_text_view_iface_init (EmpathyChatViewIface *iface);
 
+static guint8 *
+chat_text_view_serialize_text (GtkTextBuffer *register_buffer,
+							   GtkTextBuffer *content_register,
+							   const GtkTextIter *start,
+							   const GtkTextIter *end,
+							   gsize *lenght,
+							   gpointer user_data);
+
 static void chat_text_view_copy_clipboard (EmpathyChatView *view);
 
 G_DEFINE_TYPE_WITH_CODE (EmpathyChatTextView, empathy_chat_text_view,
@@ -646,6 +654,11 @@ empathy_chat_text_view_init (EmpathyChatTextView *view)
 			  "populate-popup",
 			  G_CALLBACK (chat_text_view_populate_popup),
 			  NULL);
+
+	gtk_text_buffer_register_serialize_format (priv->buffer,
+											   "text/plain",
+											   chat_text_view_serialize_text,
+											   NULL, NULL);
 }
 
 static void
@@ -1228,29 +1241,19 @@ chat_text_view_highlight (EmpathyChatView *view,
 }
 
 static void
-chat_text_view_copy_clipboard (EmpathyChatView *view)
+chat_text_view_unparse_string (GtkTextBuffer *buffer,
+							   const GtkTextIter *start,
+							   const GtkTextIter *end,
+							   GString *str)
 {
-	GtkTextBuffer *buffer;
-	GtkTextIter start, iter, end;
-	GtkClipboard  *clipboard;
+	GtkTextIter iter;
+	GList *list;
 	GdkPixbuf *pixbuf;
-	gunichar c;
 	GtkTextChildAnchor *anchor = NULL;
-	GString *str;
-	GList *list;
+	gunichar c;
 	gboolean ignore_newlines = FALSE;
 
-	g_return_if_fail (EMPATHY_IS_CHAT_TEXT_VIEW (view));
-
-	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
-	clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
-
-	if (!gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
-		return;
-
-	str = g_string_new ("");
-
-	for (iter = start; !gtk_text_iter_equal (&iter, &end); gtk_text_iter_forward_char (&iter)) {
+	for (iter = *start; !gtk_text_iter_equal (&iter, end); gtk_text_iter_forward_char (&iter)) {
 		c = gtk_text_iter_get_char (&iter);
 		/* 0xFFFC is the 'object replacement' unicode character,
 		 * it indicates the presence of a pixbuf or a widget. */
@@ -1283,11 +1286,52 @@ chat_text_view_copy_clipboard (EmpathyChatView *view)
 			str = g_string_append_unichar (str, c);
 		}
 	}
+}
+
+static void
+chat_text_view_copy_clipboard (EmpathyChatView *view)
+{
+	GtkTextBuffer *buffer;
+	GtkTextIter start, end;
+	GtkClipboard  *clipboard;
+	GString *str;
+
+	g_return_if_fail (EMPATHY_IS_CHAT_TEXT_VIEW (view));
+
+	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
+	clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
+
+	if (!gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
+		return;
+
+	str = g_string_new ("");
+
+	chat_text_view_unparse_string (buffer, &start, &end, str);
 
 	gtk_clipboard_set_text (clipboard, str->str, str->len);
 	g_string_free (str, TRUE);
 }
 
+static guint8 *
+chat_text_view_serialize_text (GtkTextBuffer *register_buffer,
+							   GtkTextBuffer *content_buffer,
+							   const GtkTextIter *start,
+							   const GtkTextIter *end,
+							   gsize *lenght,
+							   gpointer user_data)
+{
+	guint8 *res;
+	GString *str = g_string_new ("");
+
+	chat_text_view_unparse_string (content_buffer, start, end, str);
+
+	res = (guint8 *)str->str;
+	*lenght = str->len + 1;
+	g_string_free (str, FALSE);
+
+	return res;
+}
+
 static void
 chat_text_view_iface_init (EmpathyChatViewIface *iface)
 {
