comparison 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
comparison
equal deleted inserted replaced
587:6a1fea10ae8c 588:c8cca1a373dd
28 ">": "&gt;", 28 ">": "&gt;",
29 "<": "&lt;", 29 "<": "&lt;",
30 } 30 }
31 31
32 return "".join(html_escape_table.get(c, c) for c in text) 32 return "".join(html_escape_table.get(c, c) for c in text)
33
34
35 def convertNewLinesToXHTML(text):
36 return text.replace('\n', '<br/>')