diff src/server/html_tools.py @ 588:c8cca1a373dd

server_side: static blog: convert \n in raw text message to <br/>
author souliane <souliane@mailoo.org>
date Mon, 15 Dec 2014 16:03:01 +0100
parents 1a0cec9b0f1e
children 9877607c719a
line wrap: on
line diff
--- a/src/server/html_tools.py	Mon Dec 15 16:01:51 2014 +0100
+++ b/src/server/html_tools.py	Mon Dec 15 16:03:01 2014 +0100
@@ -30,3 +30,7 @@
         }
 
     return "".join(html_escape_table.get(c, c) for c in text)
+
+
+def convertNewLinesToXHTML(text):
+    return text.replace('\n', '<br/>')