Mercurial > libervia-web
diff src/browser/sat_browser/base_panels.py @ 468:830b50593597
browser_side: fixes issues from the refactoring
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 10 Jun 2014 01:15:13 +0200 |
parents | 97c72fe4a5f2 |
children | c97fe4059f71 |
line wrap: on
line diff
--- a/src/browser/sat_browser/base_panels.py Mon Jun 09 22:15:26 2014 +0200 +++ b/src/browser/sat_browser/base_panels.py Tue Jun 10 01:15:13 2014 +0200 @@ -55,9 +55,9 @@ _msg_class.append("chat_text_mymess") HTMLPanel.__init__(self, "<span class='chat_text_timestamp'>%(timestamp)s</span> <span class='chat_text_nick'>%(nick)s</span> <span class='%(msg_class)s'>%(msg)s</span>" % {"timestamp": _date.strftime("%H:%M"), - "nick": "[%s]" % html_tools.sanitize(nick), + "nick": "[%s]" % html_tools.html_sanitize(nick), "msg_class": ' '.join(_msg_class), - "msg": strings.addURLToText(html_tools.sanitize(msg)) if not xhtml else html_tools.inlineRoot(xhtml)} # FIXME: images and external links must be removed according to preferences + "msg": strings.addURLToText(html_tools.html_sanitize(msg)) if not xhtml else html_tools.inlineRoot(xhtml)} # FIXME: images and external links must be removed according to preferences ) self.setStyleName('chatText') @@ -101,7 +101,7 @@ def _refresh(self): state = (' %s' % C.MUC_USER_STATES[self._state]) if self._state else '' special = "" if len(self.special) == 0 else " %s" % self.special - self.setHTML("<div class='occupant'>%s%s%s</div>" % (html_tools.sanitize(self.nick), special, state)) + self.setHTML("<div class='occupant'>%s%s%s</div>" % (html_tools.html_sanitize(self.nick), special, state)) class OccupantsList(AbsolutePanel): @@ -480,7 +480,7 @@ if self.options['listen_click']: ClickHandler.__init__(self) KeyboardHandler.__init__(self) - strproc = lambda text: html_tools.sanitize(html_tools.html_strip(text)) if self.options['no_xhtml'] else html_tools.html_strip(text) + strproc = lambda text: html_tools.html_sanitize(html_tools.html_strip(text)) if self.options['no_xhtml'] else html_tools.html_strip(text) BaseTextEditor.__init__(self, content, strproc, modifiedCb, afterEditCb) self.textarea = self.display = None