From 372d3655e6004fd42b0b2d8de3905ae663be9ffa Mon Sep 17 00:00:00 2001
From: Graham Cole <chckens@sucs.org>
Date: Tue, 4 Oct 2011 13:34:26 +0000
Subject: [PATCH] stop url components being escaped too early and breaking the
 breadcrumb links

---
 plugins/function.buildpath.php | 2 +-
 templates/breadcrumb.tpl       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/function.buildpath.php b/plugins/function.buildpath.php
index c67e494..41f2434 100644
--- a/plugins/function.buildpath.php
+++ b/plugins/function.buildpath.php
@@ -2,7 +2,7 @@
 	function smarty_function_buildpath($params, &$smarty) {
 		if ($params['item']=="") return "/";
 		foreach ($params['list'] as $crumb) {
-			if ($crumb!="") $output.="/".$crumb;
+			if ($crumb!="") $output.="/".rawurlencode($crumb);
 			if ($crumb==$params['item']) return $output;
 		}
 
diff --git a/templates/breadcrumb.tpl b/templates/breadcrumb.tpl
index b77a6ca..01b5602 100644
--- a/templates/breadcrumb.tpl
+++ b/templates/breadcrumb.tpl
@@ -2,7 +2,7 @@
 {if $pathlist}
 				<ul>
 {foreach name=pathlist from=$pathlist key=key item=item}
-					<li>{if !$smarty.foreach.pathlist.first}{if $item!=""}&gt; {/if}{/if}{if !$smarty.foreach.pathlist.last}<a href="{buildpath list=$pathlist item=$item|escape:'url'}">{/if}{if $item}{$item|escape:'htmlall'}{else}{if $smarty.foreach.pathlist.first}SUCS{/if}{/if}{if !$smarty.foreach.pathlist.last}</a>{/if}</li>
+					<li>{if !$smarty.foreach.pathlist.first}{if $item!=""}&gt; {/if}{/if}{if !$smarty.foreach.pathlist.last}<a href="{buildpath list=$pathlist item=$item}">{/if}{if $item}{$item|escape:'htmlall'}{else}{if $smarty.foreach.pathlist.first}SUCS{/if}{/if}{if !$smarty.foreach.pathlist.last}</a>{/if}</li>
 {/foreach}
 				</ul>
 {/if}
-- 
GitLab