Merge branch 'master' of http://git.gitphp.org/gitphp
Merge branch 'master' of http://git.gitphp.org/gitphp

--- a/include/Util.class.php
+++ b/include/Util.class.php
@@ -162,6 +162,8 @@
 			else
 				$baseurl = 'http://' . $baseurl;
 		}
+		if (GitPHP_Util::IsWindows())
+			$baseurl = rtrim($baseurl, "\\");
 		return rtrim($baseurl, "/");
 	}
 

--- a/include/git/FileHistory.class.php
+++ b/include/git/FileHistory.class.php
@@ -280,7 +280,7 @@
 		$args[] = $this->path;
 		$args[] = '|';
 		$args[] = $this->exe->GetBinary();
-		$args[] = '--git-dir=' . $this->project->GetPath();
+		$args[] = '--git-dir=' . escapeshellarg($this->project->GetPath());
 		$args[] = GIT_DIFF_TREE;
 		$args[] = '-r';
 		$args[] = '--stdin';

--- a/include/git/GitExe.class.php
+++ b/include/git/GitExe.class.php
@@ -192,7 +192,7 @@
 	{
 		$gitDir = '';
 		if (!empty($projectPath)) {
-			$gitDir = '--git-dir=' . $projectPath;
+			$gitDir = '--git-dir=' . escapeshellarg($projectPath);
 		}
 		
 		return $this->binary . ' ' . $gitDir . ' ' . $command . ' ' . implode(' ', $args);

comments