Mercurial > libervia-web
comparison browser_side/html_tools.py @ 405:41b8b96f2248
browser_side: display new lines in microblogs (convert '\n' to '<br/>')
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 15 Mar 2014 00:33:04 +0100 |
parents | 30d03d9f07e4 |
children |
comparison
equal
deleted
inserted
replaced
404:c393e7dc9ae6 | 405:41b8b96f2248 |
---|---|
38 | 38 |
39 def inlineRoot(xhtml): | 39 def inlineRoot(xhtml): |
40 """ make root element inline """ | 40 """ make root element inline """ |
41 doc = dom.parseString(xhtml) | 41 doc = dom.parseString(xhtml) |
42 return xmltools.inlineRoot(doc) | 42 return xmltools.inlineRoot(doc) |
43 | |
44 | |
45 def convertNewLinesToXHTML(text): | |
46 return text.replace('\n', '<br/>') |