changeset 503:88ece2a00c63

browser_side: display new lines and clickable URLs for headline message
author souliane <souliane@mailoo.org>
date Thu, 14 Aug 2014 13:27:07 +0200
parents 4aa627b059df
children f030491cff75
files src/browser/libervia_main.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Wed Aug 13 15:06:40 2014 +0200
+++ b/src/browser/libervia_main.py	Thu Aug 14 13:27:07 2014 +0200
@@ -27,7 +27,7 @@
 ###
 
 from sat_frontends.tools.misc import InputHistory
-from sat_frontends.tools.strings import getURLParams
+from sat_frontends.tools import strings
 from sat.core.i18n import _
 
 from pyjamas.ui.RootPanel import RootPanel
@@ -387,7 +387,7 @@
         """This method retrieve the eventual URL parameters to auto-connect the user.
         @param skip_validation: if True, set the form values but do not validate it
         """
-        params = getURLParams(Window.getLocation().getSearch())
+        params = strings.getURLParams(Window.getLocation().getSearch())
         if "login" in params:
             self._register_box._form.right_side.selectTab(0)
             self._register_box._form.login_box.setText(params["login"])
@@ -693,6 +693,7 @@
                 title = extra['subject']
             except (KeyError, AssertionError):
                 title = _('Announcement from %s') % from_jid
+            msg = strings.addURLToText(html_tools.convertNewLinesToXHTML(html_tools.html_sanitize(msg)))
             dialog.InfoDialog(title, msg).show()
             return
         if lib_wid is not None: