changeset 189:67365f17069e

browser side: removed "\n" -> <br> conversion in html_sanitize, and use "white-space: pre" CSS property in chat messages instead (thx Link Mauve !).
author Goffi <goffi@goffi.org>
date Sun, 03 Mar 2013 20:44:17 +0100
parents 39936b83da9d
children abebe6d55e0a
files browser_side/tools.py public/libervia.css
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/tools.py	Sun Mar 03 19:42:18 2013 +0100
+++ b/browser_side/tools.py	Sun Mar 03 20:44:17 2013 +0100
@@ -21,4 +21,4 @@
 
 def html_sanitize(html):
     """Naive sanitization of HTML"""
-    return html.replace('<','&lt;').replace('>','&gt;').replace('\n','<br>')
+    return html.replace('<','&lt;').replace('>','&gt;')
--- a/public/libervia.css	Sun Mar 03 19:42:18 2013 +0100
+++ b/public/libervia.css	Sun Mar 03 20:44:17 2013 +0100
@@ -833,6 +833,10 @@
     border-left: none;
 }
 
+.chat_text_msg {
+    white-space: pre;
+}
+
 .chat_text_mymess {
     color: #006600;
 }