Skip to content

CK Editor and Pro Search Conflict #5199

Closed

Description

@eric-lamb62

Description of the problem

Think I may have found an issue with a combination of Pro Search and CKEditor fields.

I wanted to search for a user's full name, which is clearly structured within the HTML (as a ul element). When using CKEditor, the data wasn't returning the expected results. With Redactor it does work. So, I did some digging into the data and found that CKEditor does some "magic" which causes the HTML structure's whitespace to get munged which causes erroneous results.

This works (using Redactor)

<h2>Committee Members</h2>
<ul><li>Eric Lamb (2027)</li><li>Foo to the Shoo (2027)</li></ul>

-- Indexed Content --

| test entry | test entry |
| committee members eric lamb 2027 foo to the shoo 2027 | committee members eric lamb 2027 foo to the shoo 2027 | committee members eric lamb 2027 foo to the shoo 2027 |

This does NOT work (using CKEditor)

<h2>Committee Members</h2><ul><li>Eric Lamb (2027)</li><li>Foo to the Shoo (2027)</li></ul>

-- Indexed Content --

| test entry | test entry |
| committee memberseric lamb 2027 foo to the shoo 2027 | committee memberseric lamb 2027 foo to the shoo 2027 | committee memberseric lamb 2027 foo to the shoo 2027 |

Note the concatenation of eric lamb with members in the above

How To Reproduce
Steps to reproduce the behavior:

  1. Create field with CK Editor
  2. Edit an entry in the Channel with with HTML using a ul or an ol tag
  3. Check the pro search index
  4. Cry

Error Messages
None

Screenshots / Videos / Template Code
None

Environment Details:
All

Possible Solution
Impose some white space in between HTML tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo