diff src/browser/sat_browser/xmlui.py @ 504:f030491cff75

browser side (XMLUI): fixed bad use of text instead of XHTML in dialogs
author Goffi <goffi@goffi.org>
date Wed, 20 Aug 2014 20:59:13 +0200
parents 67a4e8383b70
children fed185c95f1c
line wrap: on
line diff
--- a/src/browser/sat_browser/xmlui.py	Thu Aug 14 13:27:07 2014 +0200
+++ b/src/browser/sat_browser/xmlui.py	Wed Aug 20 20:59:13 2014 +0200
@@ -20,8 +20,10 @@
 from sat.core.log import getLogger
 log = getLogger(__name__)
 from sat_frontends.tools import xmlui
+from sat_frontends.tools import strings
 from sat_browser.constants import Const as C
 from sat_browser import dialog
+from sat_browser import html_tools
 
 from pyjamas.ui.VerticalPanel import VerticalPanel
 from pyjamas.ui.HorizontalPanel import HorizontalPanel
@@ -309,6 +311,8 @@
 
     def __init__(self, _xmlui_parent, title, message, level):
         #TODO: level is not managed
+        title = html_tools.html_sanitize(title)
+        message = strings.addURLToText(html_tools.XHTML2Text(message))
         Dlg.__init__(self)
         xmlui.MessageDialog.__init__(self, _xmlui_parent)
         dialog.InfoDialog.__init__(self, title, message, self._xmluiValidated())
@@ -326,8 +330,9 @@
 
     def __init__(self, _xmlui_parent, title, message, level):
         #TODO: level is not managed
+        title = html_tools.html_sanitize(title)
+        message = strings.addURLToText(html_tools.XHTML2Text(message))
         xmlui.ConfirmDialog.__init__(self, _xmlui_parent)
-        print "self.parent = %s" % self._xmlui_parent
         Dlg.__init__(self)
         dialog.ConfirmDialog.__init__(self, self.answered, message, title)