diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index f403c91fe..b5494ccc6 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -998,7 +998,7 @@ $(document).ready(function() { $option = array($v, getReadableDate($v)); break; default: - $option = array($v, $v); + $option = array(htmlspecialchars($v), htmlspecialchars($v)); } if(isset($attributes[$facetname]) && is_array($attributes[$facetname]) && in_array($v, $attributes[$facetname])) $option[] = true; @@ -1111,9 +1111,9 @@ $(document).ready(function() { if($oldvalue) { unset($allparams['attributes'][$facetname]); $newrequest = Symfony\Component\HttpFoundation\Request::create($request->getBaseUrl(), 'GET', $allparams); - $menuitems[] = array('label'=>' '.$dispname.' = '.implode(', ', $oldvalue), 'link'=>$newrequest->getRequestUri(), 'attributes'=>[['title', 'Click to remove']], '_badge'=>'x'); + $menuitems[] = array('label'=>' '.$dispname.' = '.htmlspecialchars(implode(', ', $oldvalue)), 'link'=>$newrequest->getRequestUri(), 'attributes'=>[['title', 'Click to remove']], '_badge'=>'x'); foreach($oldvalue as $ov) - echo ''; + echo ''; } } } @@ -1169,9 +1169,9 @@ $(document).ready(function() { if($oldvalue) { unset($allparams[$facetname]); $newrequest = Symfony\Component\HttpFoundation\Request::create($request->getBaseUrl(), 'GET', $allparams); - $menuitems[] = array('label'=>' '.getMLText($facetname).' = '.implode(', ', $oldtransval), 'link'=>$newrequest->getRequestUri(), 'attributes'=>[['title', 'Click to remove']], '_badge'=>'x'); + $menuitems[] = array('label'=>' '.getMLText($facetname).' = '.htmlspecialchars(implode(', ', $oldtransval)), 'link'=>$newrequest->getRequestUri(), 'attributes'=>[['title', 'Click to remove']], '_badge'=>'x'); foreach($oldvalue as $ok=>$ov) - echo ''; + echo ''; } } } @@ -1495,7 +1495,7 @@ $(document).ready(function() { $attrstr .= $arr; } else { $attrdef = $lcattribute->getAttributeDefinition(); - $attrstr .= "