[Mpuls-commits] r909 - wasko/branches/2.0/waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jan 26 18:01:16 CET 2010
Author: torsten
Date: 2010-01-26 18:01:16 +0100 (Tue, 26 Jan 2010)
New Revision: 909
Modified:
wasko/branches/2.0/waskaweb/lib/helpers.py
Log:
* waskaweb/lib/helpers.py (replaceNewlines): Call nl_to_br function from lib.filters
Modified: wasko/branches/2.0/waskaweb/lib/helpers.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/helpers.py 2010-01-26 16:59:09 UTC (rev 908)
+++ wasko/branches/2.0/waskaweb/lib/helpers.py 2010-01-26 17:01:16 UTC (rev 909)
@@ -44,7 +44,7 @@
from waskaweb.lib.navigation import get_pagename, render_navigation
from waskaweb.lib.security import hasRole
-from waskaweb.lib.filters import shorten
+from waskaweb.lib.filters import shorten, nl_to_br
PRINTABLE = frozenset(printable)
@@ -91,13 +91,7 @@
return retval
def replaceNewlines(value=''):
- try:
- value = value.replace('\r\n', '<br>')
- value = value.replace('\n', '<br>')
- value = value.replace('\r', '<br>')
- except:
- return ''
- return value
+ return nl_to_br(value)
# Format functions
More information about the Mpuls-commits
mailing list