Review main Merged

91590[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
    • Benjamin Franzke +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Andreas Nedbal +2
    • Benjamin Franzke +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 913

  1. Andreas Nedbal uploaded patch set 1 11/12/25, 17:00

  2. core-ci voted on patch set 1 V +1 11/12/25, 17:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89377

  3. Andreas Nedbal updated the commit message in patch set 2 V +1 11/13/25, 08:47

  4. Andreas Nedbal updated the commit message in patch set 3 11/13/25, 08:49

  5. core-ci voted on patch set 2 V +1 11/13/25, 08:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89439

  6. core-ci voted on patch set 3 V +1 11/13/25, 08:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89441

  7. Riccardo De Contardi commented on patch set 3 V +1 11/13/25, 08:59

    tested on latest main
  8. Benjamin Franzke uploaded patch set 4 V +1 11/13/25, 11:48

  9. Benjamin Franzke commented on patch set 4 11/13/25, 11:48

    tree.ts:1136

    Why did you add this stray space? I do not think this is needed and removed this now.
  10. core-ci voted on patch set 4 V +1 11/13/25, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89481

  11. Garvin Hicking voted on patch set 4 CR +1 V +1 11/13/25, 12:03

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

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