Search results output includes <strong> tag, which breaks the output.

Created on 27 February 2024, about 1 year ago

Problem/Motivation

When results are rendered, all tags are stripped except for <strong>, leaving it not closed:

This makes the results look like this - subsequent text is all in bold:

The culprit is the template at line #23, which essentially strips all tags except <strong>:

{% for idx, item in value.field %}
  <li>{{ item|striptags('<strong>')|raw }}</li>
{% endfor %}

Proposed resolution

Fix striptags filter application in the template.

πŸ› Bug report
Status

Active

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States euk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    There was already an MR

  • Status changed to Needs work 18 days ago
  • πŸ‡ΊπŸ‡ΈUnited States euk

    How are you triggering this issue?

    Simply by searching the content. The output HTML is corrupt.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Not experiencing this issue.

  • πŸ‡ΊπŸ‡ΈUnited States euk

    Ok. This is a year old ticket, it was originally created against version 8.x-1.0-rc7 of the module. Back at time the issue was present.
    Apparently version 2.x works as expected. 8.x-1.0 works as expected as well.

    It could have been a combination of a few factors, but I can't replicate it now, at least not on a clean D10 setup.

    Probably makes sense to close?

  • πŸ‡ΊπŸ‡ΈUnited States euk

    Closing as cannot longer reproduce on a clean D10 install. Other factors not directly related to the Scanner module might have played role.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Saving credit for yourself for the initial work

  • Production build 0.71.5 2024