Review main Ready for review

96065[BUGFIX] Decode HTML entities in processed record values

Wolfgang Klinger CR 0 V 0 Normal +106 −2 updated 11/13/26, 10:22

Commit message

Text field values are stripped of HTML tags to build record
titles, Element Information, page module previews and FlexForm
values, but entities like & or   stayed encoded and
were shown literally.

The value is now decoded after the tags are stripped, so an
escaped tag stays visible as text. Whitespace is normalised
afterwards, as a decoded   is not removed by trim().

The record list passes values through unprocessed and showed
the markup of rich text columns. It now lists them as plain
text as well.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/65/96065/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/65/96065/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 26

Issues 1

Files 4

Review log 68

  1. Wolfgang Klinger uploaded patch set 1 09/25/26, 08:09

  2. core-ci voted on patch set 1 V +1 09/25/26, 08:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109230

  3. Josua Vogel voted on patch set 1 CR +1 V +1 09/26/26, 10:21

  4. Georg Ringer voted on patch set 1 CR +1 V +1 09/28/26, 19:25

  5. Simon Schaufelberger voted on patch set 1 CR +1 V +1 11/06/26, 00:50

  6. Benni Mack commented on patch set 1 CR -1 11/12/26, 20:27

    Unresolved

    Thanks Wolfgang, the direction is right, and decoding after strip_tags() is the correct order. A few things before this can go in: 1. The commit message promises more than the patch does. "List values" aren't affected. The list module goes through getProcessedValueExtra(), which always sets $defaultPassthrough = true, so the changed line is never reached there and an RTE column still shows <p>Fish &amp; Chips</p>. What the patch does fix is record titles (incl. label_alt, e.g. tt_content without header), Element Information, page module field previews, FlexForm values and the Info module. Please extend the fix to the list module. 2. Tests: please turn the test into a data provider against getProcessedValue() directly, not only via getRecordTitle(). 3. &nbsp;: it becomes U+00A0, which trim() doesn't remove. With the example from the issue (<td>&nbsp;&nbsp;</td>) the label ends in NBSPs plus the line breaks left over from the stripped markup, while the issue expects plain "Zobacz także". How about normalising whitespace (NBSP → space, collapse, trim)? The test currently asserts the trailing \u{00A0}. 4. Releases: I'd drop 13.4. 5. Also: Pass the flags explicitly for html_entity_decode.
  7. Wolfgang Klinger uploaded patch set 2 CR +1 V +1 11/13/26, 10:15

  8. core-ci voted on patch set 2 V +1 11/13/26, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114302