cmd/tools/fast/fast.v: html encode < > in commit messages

pull/9756/head
Delyan Angelov 2021-04-15 13:58:08 +03:00
parent d9fdae1de9
commit 5ae3b81337
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 2 additions and 1 deletions

View File

@ -54,11 +54,12 @@ fn main() {
date := time.unix(commit_date.int())
mut out := os.create('table.html') ?
// Place the new row on top
html_message := message.replace_each(['<', '&lt;', '>', '&gt;'])
table =
'<tr>
<td>$date.format()</td>
<td><a target=_blank href="https://github.com/vlang/v/commit/$commit">$commit</a></td>
<td>$message</td>
<td>$html_message</td>
<td>${diff1}ms</td>
<td>${diff2}ms</td>
<td>${diff3}ms</td>