diff --git a/src/Entity/Facet.php b/src/Entity/Facet.php index fb10862..a1037c8 100644 --- a/src/Entity/Facet.php +++ b/src/Entity/Facet.php @@ -7,6 +7,7 @@ namespace Drupal\facetapi\Entity; +use Drupal\Component\Utility\Xss; use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\facetapi\FacetInterface; @@ -432,7 +433,7 @@ class Facet extends ConfigEntityBase implements FacetInterface { * {@inheritdoc} */ public function setUrlParameter($url_parameter) { - $this->url_parameter = $url_parameter; + $this->url_parameter = Xss::filter($url_parameter); } /** diff --git a/src/Form/FacetForm.php b/src/Form/FacetForm.php index 91823df..d0def24 100644 --- a/src/Form/FacetForm.php +++ b/src/Form/FacetForm.php @@ -177,7 +177,6 @@ class FacetForm extends EntityForm { $form['url_parameter'] = [ '#type' => 'textfield', '#title' => $this->t('The name of the facet for usage in URLs'), - '#description' => $this->t('Enter the name of the facet for usage in URLs, this has to adhere to the URL standards.'), '#default_value' => $facet->getUrlParameter(), '#maxlength' => 50, '#required' => TRUE,