diff --git a/plugins/element_handler/autocomplete.inc b/plugins/element_handler/autocomplete.inc index bb2f1327c962950fa02867b0bf1ced01e8de8b6a..50a19769df862e516b75df23eba7dfb116626018 100644 --- a/plugins/element_handler/autocomplete.inc +++ b/plugins/element_handler/autocomplete.inc @@ -364,6 +364,10 @@ function finder_autocomplete_autocomplete($finder_name, $element_id, $keywords = $finder->find(); $choices = !empty($finder->find['results']) ? $finder->find['results'] : array(); + foreach (array_keys($choices) as $autofill) { + $choices[$autofill] = filter_xss($choices[$autofill]); + } + drupal_json_output($choices); }