Review 14.3 Merged

95473[BUGFIX] Escape search term of selectTree filter

Georg Ringer CR +2 V +2 Normal +81 −3 updated 08/28/26, 09:35

Commit message

The search field of a TCA selectTree passed the typed value straight
into the RegExp constructor. Meta characters were therefore treated as
syntax, and an unbalanced one made the constructor throw. Typing an
opening bracket was enough to kill the input handler, after which the
filter silently stopped working.

The search term is now compared as literal, case insensitive text using
String.includes(). This is the same comparison the escaped RegExp
performed for every valid term, so nothing else changes.

This is the counterpart of #107565, which fixed the same defect for the
filter of a selectMultipleSideBySide field.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
  • Verified V +2 Done
    • Georg Ringer +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 34

  1. Georg Ringer commented on patch set 1 08/28/26, 09:24

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 08/28/26, 09:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107325

  3. Georg Ringer voted on patch set 1 CR +2 V +2 08/28/26, 09:35

  4. Georg Ringer merged patch set 2 08/28/26, 09:35