# HG changeset patch # User Gary Kramlich # Date 1751598013 18000 # Node ID 2869475811884396f18a8c4329fb5c2aa658af6f # Parent 2ffc42909b30d7fb16b9a2fc28d1745a42c931b1 Re-enable links in Pidgin.Message This was disabled in /r/3970 as we thought it was breaking formatting. I've since put together a proof of concept that proves that you can set the pango attributes to null or empty and the formatting gets removed. That means the bug is somewhere in our code, but I haven't yet found it. But in the mean time, it makes sense to turn links back on as they're super useful. Testing Done: Joined an irc channel and sent a link from pidgin2 and verified that it was displayed and operated correctly. Reviewed at https://reviews.imfreedom.org/r/4047/ diff -r 2ffc42909b30 -r 286947581188 pidgin/pidginmessage.c --- a/pidgin/pidginmessage.c Thu Jul 03 01:56:45 2025 -0500 +++ b/pidgin/pidginmessage.c Thu Jul 03 22:00:13 2025 -0500 @@ -146,6 +146,23 @@ return NULL; } +static char * +pidgin_message_process_message_contents_cb(G_GNUC_UNUSED GObject *self, + const char *contents, + G_GNUC_UNUSED gpointer data) +{ + char *escaped = NULL; + char *linkified = NULL; + + escaped = g_markup_escape_text(contents, -1); + + linkified = purple_markup_linkify(escaped); + + g_free(escaped); + + return linkified; +} + static gboolean pidgin_message_query_tooltip_contents_cb(GtkWidget *self, G_GNUC_UNUSED gint x, @@ -330,6 +347,8 @@ gtk_widget_class_bind_template_callback(widget_class, pidgin_message_query_tooltip_contents_cb); gtk_widget_class_bind_template_callback(widget_class, + pidgin_message_process_message_contents_cb); + gtk_widget_class_bind_template_callback(widget_class, pidgin_message_query_tooltip_edited_cb); gtk_widget_class_bind_template_callback(widget_class, pidgin_message_query_tooltip_timestamp_cb); diff -r 2ffc42909b30 -r 286947581188 pidgin/resources/Conversations/message.ui --- a/pidgin/resources/Conversations/message.ui Thu Jul 03 01:56:45 2025 -0500 +++ b/pidgin/resources/Conversations/message.ui Thu Jul 03 22:00:13 2025 -0500 @@ -76,10 +76,13 @@ word-char 0 0 + true - - PidginMessage - + + + PidginMessage + +