From ef81e64346bf6e47c5d9179da092556e3f6f23ab Mon Sep 17 00:00:00 2001 From: hyokeun Date: Tue, 10 Apr 2018 19:55:39 +0900 Subject: [PATCH] Parsing commit log properly Change-Id: If8ecee4e648f6e2b75d41d038200bae065f72866 --- snapdiff/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snapdiff/__init__.py b/snapdiff/__init__.py index c64cbb7..785ca8c 100644 --- a/snapdiff/__init__.py +++ b/snapdiff/__init__.py @@ -98,15 +98,15 @@ def diff_to_json(old_url, new_url, **kwargs): #'--pretty="format:||||%H|||%aN<%aE>%n%s%n%b||||"'], stdout=f) f.close() f = io.open(log_filename, 'r', encoding='utf-8', errors='ignore') - contents = escape_html(f.read()) + contents = f.read() sp = contents.split("<-=^$>") data = [] for idx in range(1, len(sp), 2): l = sp[idx].split("<$^=->") - data.append({"commit_id": l[0], - "committer": l[1], - "commit_date": l[2], - "commit_log": {'html':escape_html_newline(l[3]), 'raw':l[3]}}) + data.append({"commit_id": escape_html(l[0]), + "committer": escape_html(l[1]), + "commit_date": escape_html(l[2]), + "commit_log": {'html':escape_html_newline(escape_html(l[3])), 'raw':escape_html(l[3])}}) f.close() return data -- 2.7.4