Avoid double escaping in breadcrumbs

This commit is contained in:
Jakub Vrana 2013-07-04 21:07:52 -07:00
parent 063ddcced5
commit 679e818fca

View file

@ -53,9 +53,9 @@ document.body.className = document.body.className.replace(/ nojs/, ' js');
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> &raquo; ';
}
foreach ($breadcrumb as $key => $val) {
$desc = (is_array($val) ? $val[1] : $val);
$desc = (is_array($val) ? $val[1] : h($val));
if ($desc != "") {
echo '<a href="' . h(ME . "$key=") . urlencode(is_array($val) ? $val[0] : $val) . '">' . h($desc) . '</a> &raquo; ';
echo "<a href='" . h(ME . "$key=") . urlencode(is_array($val) ? $val[0] : $val) . "'>$desc</a> &raquo; ";
}
}
}