Describe the issue in as much detail as possible. Please remove the sections below if the issue is obvious enough and doesn’t require extra details.
Steps to reproduce
Create a listing attribute of type select
Add many options, some containing & in their label (e.g. Dolce & Gabbana, Tartine & Chocolat)
Open the listing form and interact with the field
Start typing in the Select2 search input
Actual result
When the number of options is large enough to trigger Select2’s search mode, labels containing & are displayed as & in the dropdown (e.g. Dolce & Gabbana).
This does not happen when the option count is low (simple select, no search input).
Expected result
Option labels should always render decoded characters regardless of the number of options and the Select2 rendering mode.
Extra details
Values are entered correctly in the back-office using &, not &. The issue appears to be in the Select2 results rendering, where HTML entities are not decoded before display. Reproduced on two separate environments (shared hosting and AWS). Screenshots attached.
Do you have an estimated timeframe for when this fix will be included in a release?
Unfortunately, this issue is currently blocking us from publishing several attributes because many brands contain the “&” character (e.g. Dolce & Gabbana, Bath & Body Works, Abercrombie & Fitch, etc.), and the rendered values look broken in the Select2 search results.
In the meantime, could you recommend a temporary workaround?
Would you suggest:
a custom filter/hook to decode the labels before rendering,
a JavaScript workaround on the Select2 results,
or any other safe approach that won’t conflict with the future fix?
We’d prefer to avoid maintaining a custom patch if a native fix is expected soon.