From e26fd1eee75e0845f6a6b9e480d3dafe8b943bf6 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Thu, 30 Nov 2006 21:25:41 +0100
Subject: [PATCH] special char encoding fix for breadcrumbs #993

darcs-hash:20061130202541-7ad00-fc46a71f59d699f2cc720f361f22da8260e7ca92.gz
---
 inc/template.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/inc/template.php b/inc/template.php
index 09b5725f6..9d3efb339 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -638,7 +638,7 @@ function tpl_breadcrumbs(){
     $i++;
     print ' <span class="bcsep">&raquo;</span> ';
     if ($i == $last) print '<span class="curid">';
-    tpl_link(wl($id),$name,'class="breadcrumbs" title="'.$id.'"');
+    tpl_link(wl($id),hsc($name),'class="breadcrumbs" title="'.$id.'"');
     if ($i == $last) print '</span>';
   }
 }
@@ -671,7 +671,7 @@ function tpl_youarehere($sep=' &raquo; '){
   // always print the startpage
   $title = p_get_first_heading($conf['start']);
   if(!$title) $title = $conf['start'];
-  tpl_link(wl($conf['start']),$title,'title="'.$conf['start'].'"');
+  tpl_link(wl($conf['start']),hsc($title),'title="'.$conf['start'].'"');
 
   // print intermediate namespace links
   $part = '';
@@ -686,7 +686,7 @@ function tpl_youarehere($sep=' &raquo; '){
     if($exists){
       $title = p_get_first_heading($page);
       if(!$title) $title = $parts[$i];
-      tpl_link(wl($page),$title,'title="'.$page.'"');
+      tpl_link(wl($page),hsc($title),'title="'.$page.'"');
     }else{
       tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2"');
     }
@@ -700,7 +700,7 @@ function tpl_youarehere($sep=' &raquo; '){
   if(@file_exists(wikiFN($page))){
     $title = p_get_first_heading($page);
     if(!$title) $title = $parts[$i];
-    tpl_link(wl($page),$title,'title="'.$page.'"');
+    tpl_link(wl($page),hsc($title),'title="'.$page.'"');
   }else{
     tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2"');
   }
-- 
GitLab