--- a/mediawiki/skins/gmo.php
+++ b/mediawiki/skins/gmo.php
@@ -195,28 +195,29 @@ class GMOTemplate extends QuickTemplate
<?php
$last_piece = end($pieces); /* define a last item in array */
$elements_count = count($pieces);
$elements_count -= 1;
foreach ($pieces as $key => $url) {
$label = ucwords($url);
$moj_niz = array(0 => "Revision History", 1 => "action=edit");
$moj_niz[] = $label;
- $url = "http://guides.stage.mozilla.com/";
+ $url = htmlspecialchars"http://guides.stage.mozilla.com/";
foreach ($moj_niz as $kljuc => $clan) {
if(!substr($pieces[i], $clan) >= 0) {
unset($pieces[i]); /* remove edit page, history revision and such from breadcrumbs */
}
else {}
}
for ($i = 0; $i <= $key; $i++) {
if($i == $elements_count) { $url .= $pieces[$i]; }
else {$url .= $pieces[$i] . "/";}
}
$url = preg_replace('/ /', '_', $url);
+ $url = htmlspecialchars($url, ENT_QUOTES);
if ($url != "" && $label != $last_piece) { /* don't put | sign after the last piece */
if(!array_search("action=", $moj_niz) && $last_piece != "Main_Page") {
echo "<span class=\"breadcrumb-item\"> <a href=" . substr_replace($url ,"",-1) . ">" . $label . "</a> > </span>";
} else {}
} else {
if(!array_search("action=", $moj_niz)) {
echo "<span class=\"breadcrumb-item\"> <a href=" . $url . ">" . $label . "</a></span>";
} else {}