provide nl2br function in base view
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3357 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
a522c4d218
commit
c3a05f7a48
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,7 @@ from zope.proxy import removeAllProxies
|
|||
from zope.security.proxy import removeSecurityProxy
|
||||
from zope.traversing.browser import absoluteURL
|
||||
|
||||
from cybertools.util import format
|
||||
from loops.common import adapted
|
||||
from loops.i18n.browser import LanguageInfo
|
||||
from loops import util
|
||||
|
@ -130,6 +131,9 @@ class BaseView(object):
|
|||
view = component.getMultiAdapter((removeAllProxies(source), self.request))
|
||||
return view.render()
|
||||
|
||||
def nl2br(self, text):
|
||||
return format.nl2br(text)
|
||||
|
||||
|
||||
pattern = re.compile(r'[ /\?\+%]')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue