comparison browser_side/tools.py @ 182:ec37ec737411

browser side: html_sanitize now manage Line Feed, fixing multi-lines messages in chat widget
author Goffi <goffi@goffi.org>
date Tue, 26 Feb 2013 00:39:19 +0100
parents 9763dec220ed
children 67365f17069e
comparison
equal deleted inserted replaced
181:c0b78a3af06d 182:ec37ec737411
19 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 """ 20 """
21 21
22 def html_sanitize(html): 22 def html_sanitize(html):
23 """Naive sanitization of HTML""" 23 """Naive sanitization of HTML"""
24 return html.replace('<','&lt;').replace('>','&gt;') 24 return html.replace('<','&lt;').replace('>','&gt;').replace('\n','<br>')