Permalink
Browse files

Fixed HTML Tag problem in commit messages

  • Loading branch information...
xanmanning committed Aug 3, 2010
1 parent 7113c92 commit 40e003f28dd731094aad0daf23140c169210fcd9
Showing with 3 additions and 3 deletions.
  1. +3 −3 git.php
View
@@ -399,7 +399,7 @@ function html_blob($proj, $blob) {
//echo "nonhighlight!";
$cmd = "GIT_DIR=" . escapeshellarg($repopath . $CONFIG['repo_suffix']) . " git cat-file blob " . escapeshellarg($blob) . " 2>&1";
exec($cmd, &$out);
- $out = "<pre>" . htmlspecialchars(implode("\n", $out)) . "</pre>";
+ $out = "<pre>" . implode("\n", $out) . "</pre>";
echo $out;
} elseif($ext == "download") {
//echo "download";
@@ -552,7 +552,7 @@ function html_shortlog($proj, $lines) {
$date = date($CONFIG['git_date_format'], (int)$c['date']);
$cid = $order[$i];
$pid = $c['parent'];
- $mess = short_desc($c['message'], 40);
+ $mess = short_desc(htmlspecialchars($c['message']), 40);
$auth = short_desc($c['author'], 25);
$tid = $c['tree'];
// different ways of displaying diff
@@ -792,7 +792,7 @@ function git_commit($proj, $cid) {
$commit["date"] = $d[0];
break;
case "message":
- $commit["message"] = implode(" ", $d);
+ $commit["message"] = htmlspecialchars(implode(" ", $d));
break;
case "endrecord":
break;

0 comments on commit 40e003f

Please sign in to comment.