diff 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
line wrap: on
line diff
--- a/browser_side/tools.py	Sun Feb 24 18:15:38 2013 +0100
+++ b/browser_side/tools.py	Tue Feb 26 00:39:19 2013 +0100
@@ -21,4 +21,4 @@
 
 def html_sanitize(html):
     """Naive sanitization of HTML"""
-    return html.replace('<','&lt;').replace('>','&gt;')
+    return html.replace('<','&lt;').replace('>','&gt;').replace('\n','<br>')