Commit 9dae7aa1 authored by Claudemir Todo Bom's avatar Claudemir Todo Bom

* fix language mixup (python syntax is different than php)

parent b9e86b5a
Pipeline #173 passed with stage
in 1 minute and 32 seconds
......@@ -19,6 +19,7 @@ import shlex
import email.mime.multipart
import email.mime.text
import mailbox
import textwrap
class NoMoreData(Exception):
pass
......@@ -153,6 +154,7 @@ class JunkReport:
self.htmlText = u""
self.plainText = u""
self.tmpl = wwMailUtils.htmlTemplate()
self.wrapper = textwrap.TextWrapper(75)
def addTextTitleValue(self, title, value, textOnly = False, htmlOnly = False):
if htmlOnly or not textOnly:
......@@ -166,7 +168,7 @@ class JunkReport:
def addParagraph(self, text):
self.htmlText = self.htmlText + (u"<p>%s</p>"%(cgi.escape(text)))
self.plainText = self.plainText + (u"%s\n\n"%(wordwrap(text)))
self.plainText = self.plainText + (u"%s\n\n"%(self.wrapper(text)))
def addHtmlTemplate(self, content, clean=None):
self.htmlText = self.htmlText + (content%self.tmpl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment