diff browser_side/panels.py @ 217:f7ec248192de

browser_side: display clickable URLs in chat text
author souliane <souliane@mailoo.org>
date Sun, 08 Sep 2013 12:34:00 +0200
parents 7b26be266ab1
children 4e6467efd6bf
line wrap: on
line diff
--- a/browser_side/panels.py	Sun Sep 08 13:40:01 2013 +0200
+++ b/browser_side/panels.py	Sun Sep 08 12:34:00 2013 +0200
@@ -40,7 +40,7 @@
 from radiocol import RadioColPanel
 from menu import Menu
 from jid import JID
-from tools import html_sanitize
+from tools import html_sanitize, addURLToText
 from datetime import datetime
 from time import time
 import dialog
@@ -274,7 +274,7 @@
             </div>
             """ % {"author": html_sanitize(self.author),
                    "timestamp": _datetime,
-                   "body": html_sanitize(mblog_entry.content)
+                   "body": addURLToText(html_sanitize(mblog_entry.content))
                     })
         self.avatar = Image(blog_panel.host.getAvatar(self.author))
         self.panel.add(self.avatar, "id_avatar")
@@ -533,7 +533,7 @@
                            {"timestamp": _date.strftime("%H:%M"),
                             "nick": "[%s]" % html_sanitize(nick),
                             "msg_class": ' '.join(_msg_class),
-                            "msg": html_sanitize(msg)}
+                            "msg": addURLToText(html_sanitize(msg))}
                            )
         self.setStyleName('chatText')