[Mpuls-commits] r908 - wasko/branches/2.0/waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jan 26 17:59:10 CET 2010
Author: torsten
Date: 2010-01-26 17:59:09 +0100 (Tue, 26 Jan 2010)
New Revision: 908
Modified:
wasko/branches/2.0/waskaweb/lib/filters.py
Log:
* waskaweb/lib/filters.py (nl_to_br): Handle newline on window an mac system correct
Modified: wasko/branches/2.0/waskaweb/lib/filters.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/filters.py 2010-01-26 16:56:01 UTC (rev 907)
+++ wasko/branches/2.0/waskaweb/lib/filters.py 2010-01-26 16:59:09 UTC (rev 908)
@@ -51,6 +51,9 @@
def nl_to_br(text):
"""Replace newlines in text with <br> tags"""
- return text.replace('\n', '<br>')
+ text = text.replace('\r\n', '<br>')
+ text = text.replace('\n', '<br>')
+ text = text.replace('\r', '<br>')
+ return text
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
More information about the Mpuls-commits
mailing list