From 5b1a1927e416ad064f298923d9ad34c9a55538e9 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 24 Jul 2013 12:39:07 +0200
Subject: [PATCH] apply tags to puny encoded urls. Fixes #7391

---
 src/conversation_textview.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/conversation_textview.py b/src/conversation_textview.py
index b7f2300f04..bb310c9f78 100644
--- a/src/conversation_textview.py
+++ b/src/conversation_textview.py
@@ -1234,7 +1234,11 @@ class ConversationTextview(gobject.GObject):
             if 'url' in tags:
                 puny_text = puny_encode(special_text)
                 if not puny_text.endswith('-'):
-                    buffer_.insert(end_iter, " (%s)" % puny_text)
+                    puny_tags = []
+                    if use_other_tags:
+                        puny_tags += other_tags
+                    puny_tags = [(ttt.lookup(t) if isinstance(t, str) else t) for t in puny_tags]
+                    buffer_.insert_with_tags(end_iter, " (%s)" % puny_text, *puny_tags)
 
     def print_empty_line(self):
         buffer_ = self.tv.get_buffer()
-- 
GitLab