diff options
-rwxr-xr-x | gitweb.cgi | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -6592,12 +6592,6 @@ sub git_summary { # If XSS prevention is on, we don't include README.html. # TODO: Allow a readme in some safe format. - if (!$prevent_xss && -s "$projectroot/$project/README.html") { - print "<div class=\"title\">readme</div>\n" . - "<div class=\"readme\">\n"; - insert_file("$projectroot/$project/README.md"); - print "\n</div>\n"; # class="readme" - } # we need to request one more than 16 (0..15) to check if # those 16 are all @@ -6635,6 +6629,13 @@ sub git_summary { $cgi->a({-href => href(action=>"forks")}, "..."), 'no_header'); } + if (!$prevent_xss) { + print "<div class=\"title\">readme</div>\n" . + "<div class=\"readme\">\n"; + system("cd /home/git/$project && git show HEAD:README.md|pandoc --to html"); # Which is a safer + # way to do this? + print "\n</div>\n"; # class="readme" + } git_footer_html(); } |