Review 13.4 Merged

91615[BUGFIX] Prevent tree node highlights splitting encoded characters

Andreas Nedbal CR +2 V +2 Easy +15 −11 updated 11/13/25, 13:12

Commit message

This change rewrites the createNodeContentLabel method, avoiding
nodes purely being created for HTML escapes and simple replaces
for a search, as well as final "innerHTML" assembly of the node
content.

We utilize the same regex as before, in addition to a capture group,
but now with splitting instead of replacing. The capture group
retains the split-separator in the resulting matches, allowing us
to simply map through all results, wrapping every second one with
the node highlight span.

This results in cleaner code and subquently fixes bugs like the
previous implementation splitting HTML entities when "&" were
searched for.

Review

  • Code review CR +2 Done
    • Andreas Nedbal +2
  • Verified V +2 Done
    • Andreas Nedbal +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 34

  1. Andreas Nedbal commented on patch set 1 11/13/25, 13:05

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 11/13/25, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89498

  3. Andreas Nedbal voted on patch set 1 CR +2 V +2 11/13/25, 13:12

  4. Andreas Nedbal merged patch set 2 11/13/25, 13:12