All of these (bug titles, patch titles, features, and people's names)
can contain characters that are not valid html. Just escape everything
for safety.
Fixes: 86079447da1e00d49db0cbff9a102eb4e71e8702
("scripts: Add a gen_release_notes.py script")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
CURRENT_VK_VERSION = '1.1'
TEMPLATE = Template(textwrap.dedent("""\
+ <%!
+ import html
+ %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<ul>
%for f in features:
- <li>${f}</li>
+ <li>${html.escape(f)}</li>
%endfor
</ul>
<ul>
%for b in bugs:
- <li>${b}</li>
+ <li>${html.escape(b)}</li>
%endfor
</ul>
<ul>
%for c, author in changes:
%if author:
- <p>${c}</p>
+ <p>${html.escape(c)}</p>
%else:
- <li>${c}</li>
+ <li>${html.escape(c)}</li>
%endif
%endfor
</ul>