Index: app.py |
diff --git a/app.py b/app.py |
index e634f28ac88874b13cc5c1c36f21aa3fc355e723..374823c21d42d969e502bd1d35bf4c844758f256 100644 |
--- a/app.py |
+++ b/app.py |
@@ -298,7 +298,8 @@ class ConsoleData(object): |
@staticmethod |
def ContentsToHtml(contents): |
- return ''.join([str(content) for content in contents]) |
+ return ''.join([unicode(content).encode('ascii', errors='replace') |
M-A Ruel
2013/02/05 18:11:56
Why encode to ascii and not utf-8?
No need for [].
agable
2013/02/05 18:17:37
Because when you encode to utf-8 jinja2 still brea
M-A Ruel
2013/02/05 18:20:18
Probably because jinja2 wants non-encoded unicode
agable
2013/02/05 18:30:30
Done.
|
+ for content in contents]) |
@property |
def last_row(self): |
@@ -369,15 +370,17 @@ class ConsoleData(object): |
attrvalue = re.sub(r'^(\S+).*', r'\1', attrvalue) |
if attrvalue == 'DevRev': |
revision = cells[0] |
- self.SawRevision(revision=revision.findAll('a')[0].contents[0]) |
- self.SetLink(revlink=revision.findAll('a')[0].attrs[0][1]) |
+ self.SawRevision(self.ContentsToHtml( |
+ revision.findAll('a')[0].contents[0])) |
+ self.SetLink(self.ContentsToHtml(revision.findAll('a')[0].attrs[0][1])) |
nameparts = cells[1].contents |
- self.SetName(who=re.sub(r'^\s+(.*)\s*$', |
- r'\1', |
- self.ContentsToHtml(nameparts))) |
+ self.SetName(re.sub(r'^\s+(.*)\s*$', |
+ r'\1', |
+ self.ContentsToHtml(nameparts))) |
for i, bs in enumerate(cells[2:]): |
- self.SetStatus(category=self.category_order[self.lastMasterSeen][i], |
- status=str(bs.findAll('table', recursive=False)[0])) |
+ self.SetStatus(self.category_order[self.lastMasterSeen][i], |
+ self.ContentsToHtml(bs.findAll('table', |
+ recursive=False)[0])) |
if attrvalue == 'DevComment': |
self.SetComment(comment=self.ContentsToHtml(cells[0].contents)) |
if attrvalue == 'DevDetails': |