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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ruslan P created an issue. See original summary.

Ruslan Piskarov’s picture

Status: Active » Needs review
FileSize
972 bytes

Providing the patch which fixed it.

Ruslan Piskarov’s picture

Sorry, the first patch is wrong. Adding the new one.

Ruslan Piskarov’s picture

New patch also avoid this error http://take.ms/PfYWj "keywords cannot be longer than 128 characters but is currently 671 characters long".

  • vasike committed c92dc04 on 8.x-1.x authored by Ruslan P
    Issue #2904052 by Ruslan P: Wrong $suggestion when "Unformatted...

vasike credited vasike.

vasike’s picture

Priority: Normal » Major
Status: Needs review » Fixed

indeed 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)".

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.