Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello.
I have a view with "Global: Combine fields filter (exposed)", the filter is searching by two fields "Title" and "Body" http://take.ms/zH7g8. And the result in $dropdown like this https://www.screencast.com/t/oidLshtTn. However, if I choose any $suggestion from $dropdown I can see HTML in the field (look my video).
I am proposing to use Xss::filter($rendered_field, [])
for $suggestion if "Unformatted suggestion" is unchecked.
Comment | File | Size | Author |
---|---|---|---|
#4 | views_autocomplete_filters-wrong_suggestion-2904052-4.patch | 1.41 KB | Ruslan Piskarov |
Comments
Comment #2
Ruslan PiskarovProviding the patch which fixed it.
Comment #3
Ruslan PiskarovSorry, the first patch is wrong. Adding the new one.
Comment #4
Ruslan PiskarovNew patch also avoid this error http://take.ms/PfYWj "keywords cannot be longer than 128 characters but is currently 671 characters long".
Comment #7
vasikeindeed there was an bug about both "Unformatted suggestions" and the exposed filter characters limit.
So i committed the last patch.
Many thanks
If there are other issues related, maybe we'll discover and open new issues.
At least this solution adds fixes for some cases of formatted values, for examples titles with links or "formatted body(ies)".