Searchbox widget: special chars issue

Created on 18 March 2025, about 1 month ago

Problem/Motivation

Searchbox widget doesn't find values with special symbols inside (&, ", ©, etc.)

Steps to reproduce

Create term with "Milk & Honey" label, create facet and try to search for the label in the Searchbox widget. Starting from "Milk &" input the value isn't found.

Investigation

The widget compares raw string from input with HTML encoded string from span element, actually it compares "Milk & Honey" with "Milk & Honey"

Proposed resolution

Use $.text() method instead of $.html() to get correct string value. It also allows to have sub-markup inside the label keeping search functionality, e.g. "Milk & Honey"

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇾Belarus dewalt

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

Comments & Activities

Production build 0.71.5 2024