--- Confera.py.orig Thu Sep 2 15:13:01 1999 +++ Confera.py Fri Sep 3 16:24:47 1999 @@ -84,9 +84,9 @@ ############################################################################## """Confera - a web-based discussion system.""" -__version__='$Revision: 1.2 $'[11:-2] +__version__='$Revision: 1.4 $'[11:-2] -import sys, ts_regex, regsub +import sys, re from Globals import Persistent from Globals import PersistentMapping from Globals import HTMLFile ,MessageDialog @@ -104,9 +104,8 @@ from string import lower,rfind,atoi -dpat=ts_regex.compile('[\\/]') - - +crlf=re.compile('\r\n\|\n\r|\n|\r') +dpat=re.compile('[\\/]') class Topic(Folder, RoleManager): """ """ @@ -284,7 +283,7 @@ title =strip(title) author=strip(author) email =strip(email) - body =split(regsub.gsub('\r\n\|\n\r','\n',body),'\n') + body =crlf.split(body) notify=notify reviewed=(not self.moderated) and 1 or 0 @@ -562,7 +561,7 @@ title =strip(title) author =strip(author) email =strip(email) - body =split(regsub.gsub('\r\n|\n\r','\n',body),'\n') + body =crlf.split(body) notify =notify reviewed=(not self.moderated) and 1 or 0 @@ -628,7 +627,7 @@ self.title =strip(title) self.author=strip(author) self.email =strip(email) - self.body =split(regsub.gsub('\r\n|\n\r','\n',body),'\n') + self.body =crlf.split(body) self.notify=notify if self.moderated and (not self.reviewed) and reviewed: