Tools: Escape author HTML in git credits

Authors in credits_git_gen.py includes email addresses if the
`--use-email` flag is passed which include characters that need
to be escaped.

Ref !149459
This commit is contained in:
Damien Picard 2025-11-07 03:21:35 +00:00 • committed by Campbell Barton
parent f24f28f6eb
commit 3b83d75c4e

View file

@ -225,7 +225,7 @@ class Credits:
fh.write("<h3>Individual Contributors</h3>\n\n")
for author, cu in sorted_authors.items():
fh.write("{:s}, {:,d} {:s} {:s}<br />\n".format(
author if use_email else author.split("<", 1)[0].rstrip(),
html.escape(author if use_email else author.split("<", 1)[0].rstrip()),
cu.commit_total,
commit_word[cu.commit_total > 1],
(