Chromium Code Reviews| Index: appengine/chromium_build/app.py |
| diff --git a/appengine/chromium_build/app.py b/appengine/chromium_build/app.py |
| index a1cda78128ad812f33dec6322f626fe6cc41fe93..a81f5f74d23a9f991f403760f4865e22141c1028 100644 |
| --- a/appengine/chromium_build/app.py |
| +++ b/appengine/chromium_build/app.py |
| @@ -298,8 +298,7 @@ class ConsoleData(object): |
| @staticmethod |
| def ContentsToHtml(contents): |
| - return ''.join(unicode(content).encode('ascii', 'replace') |
| - for content in contents) |
| + return ''.join(str(content).decode('utf-8') for content in contents) |
| @property |
| def last_row(self): |
| @@ -482,7 +481,7 @@ def console_merger(localpath, remoteurl, page_data, |
| # Place merged data at |merged_tag|'s location in |merged_page|, and put the |
| # result in |merged_content|. |
| - merged_tag.replaceWith(str(merged_content)) |
| + merged_tag.replaceWith(merged_content) |
| # .prettify() may damage the HTML but makes output nicer. However, that |
| # cost is a bunch of extra whitespace. We reduce page size by not using |
| # .prettify(). |
| @@ -670,14 +669,14 @@ def get_position_number(commit_msg): |
| return '0' |
| -def utf8_convert(bstring): |
| +def utf8_convert(bstag): |
|
jrobbins
2015/02/12 17:55:31
What does 'bstag' stand for?
cmp
2015/02/12 17:59:58
BeautifulSoup tag.
|
| # cmp also investigated: |
| - # bstring.__str__(encoding='utf-8').decode('utf-8') |
| + # bstag.__str__(encoding='utf-8').decode('utf-8') |
| # He found that the BeautifulSoup() __str__ method when used with a 'utf-8' |
| # encoding returned effectively the same thing as str(), a Python built-in. |
| # After a handful of tests, he switched to using str() to avoid the add'l |
| # complexity of another BeautifulSoup method. |
| - return str(bstring).decode('utf-8') |
| + return str(bstag).decode('utf-8') |
| # W0613:600,28:parse_master: Unused argument 'remoteurl' |