git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9931785
)
index: escape html of git commit messages
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 13 Sep 2018 11:42:27 +0000
(13:42 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 27 May 2019 18:03:56 +0000
(20:03 +0200)
Subjects may contain '<' characters.
index.plp
patch
|
blob
|
history
diff --git
a/index.plp
b/index.plp
index 57cca2053319d5704f9a6aeecd2c5d245822a67b..db6284c9a8a70aa0d01ceb7c7cacccf9a1f52ef3 100644
(file)
--- a/
index.plp
+++ b/
index.plp
@@
-32,6
+32,7
@@
my @format = ('--date=short', "--pretty=%ad (%ar)\t%s");
if (open my $log, '-|', git => 'log', -1, @format) {{
my $line = readline $log;
$line or next; # explicitly ignore empty input
+ EscapeHTML $line;
my ($date, $subject) = split /[\t\n]/, $line;
$date =~ s/ \K/<small>/ and $date .= '</small>';
say "<p><strong>Last update</strong>: $date $subject</p>";