Escape html in commit log

This commit is contained in:
Akbar Rahman 2021-10-19 20:19:54 +01:00
parent c2b21e340e
commit 0d2889252c
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

View File

@ -77,6 +77,8 @@ def git_filehistory(working_dir, filename):
if filehistory == "": if filehistory == "":
filehistory = ["This file has no history (it may not be part of the git repository)."] filehistory = ["This file has no history (it may not be part of the git repository)."]
filehistory = [ x.replace("<", "&lt;").replace(">", "&gt;") for x in filehistory]
filehistory = "<pre>\n" + "</pre><pre>\n".join(filehistory) + "</pre>" filehistory = "<pre>\n" + "</pre><pre>\n".join(filehistory) + "</pre>"
return filehistory return filehistory