comparison browser_side/tools.py @ 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 ec37ec737411
children c2639c9f86ea
comparison
equal deleted inserted replaced
188:39936b83da9d 189:67365f17069e
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;').replace('\n','<br>') 24 return html.replace('<','&lt;').replace('>','&gt;')