urlencoded the project's name, for projects like "C#"
[gitphp.git] / templates / path.tpl
blob:a/templates/path.tpl -> blob:b/templates/path.tpl
--- a/templates/path.tpl
+++ b/templates/path.tpl
@@ -12,19 +12,19 @@
 	{if $pathobject}
 		{assign var=pathobjectcommit value=$pathobject->GetCommit()}
 		{foreach from=$pathobject->GetPathTree() item=pathtreepiece}
-			<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$pathobjectcommit->GetHash()}&h={$pathtreepiece->GetHash()}"><strong>{$pathtreepiece->GetName()}</strong></a> / 
+			<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=tree&hb={$pathobjectcommit->GetHash()}&h={$pathtreepiece->GetHash()}"><strong>{$pathtreepiece->GetName()}</strong></a> / 
 		{/foreach}
 		{if $pathobject instanceof GitPHP_Blob}
 			{if $target == 'blobplain'}
-				<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob_plain&h={$pathobject->GetHash()}&hb={$pathobjectcommit->GetHash()}&f={$pathobject->GetPath()}"><strong>{$pathobject->GetName()}</strong></a>
+				<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blob_plain&h={$pathobject->GetHash()}&hb={$pathobjectcommit->GetHash()}&f={$pathobject->GetPath()}"><strong>{$pathobject->GetName()}</strong></a>
 			{elseif $target == 'blob'}
-				<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=blob&h={$pathobject->GetHash()}&hb={$pathobjectcommit->GetHash()}&f={$pathobject->GetPath()}"><strong>{$pathobject->GetName()}</strong></a>
+				<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blob&h={$pathobject->GetHash()}&hb={$pathobjectcommit->GetHash()}&f={$pathobject->GetPath()}"><strong>{$pathobject->GetName()}</strong></a>
 			{else}
 				<strong>{$pathobject->GetName()}</strong>
 			{/if}
 		{else}
 			{if $target == 'tree'}
-				<a href="{$SCRIPT_NAME}?p={$project->GetProject()}&a=tree&hb={$pathobjectcommit->GetHash()}&h={$pathobject->GetHash()}"><strong>{$pathobject->GetName()}</strong></a> / 
+				<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=tree&hb={$pathobjectcommit->GetHash()}&h={$pathobject->GetHash()}"><strong>{$pathobject->GetName()}</strong></a> / 
 			{else}
 				<strong>{$pathobject->GetName()}</strong> / 
 			{/if}

comments