Review main Merged

96053[BUGFIX] Index title and meta tags of HTML without body tag

Benni Mack CR +2 V +2 Easy +17 −1 updated 09/25/26, 15:38

Commit message

Indexer->splitHTMLContent() determines the head part of a document by
cutting the body off the content. Without a body tag, the body is an
empty string and substr() is called with a length of "-0", which
returns an empty string. Title, keywords and description of such a
document were lost.

The whole content is now used as head part if there is no body.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 79

  1. Benni Mack uploaded patch set 1 09/25/26, 01:45

  2. Benni Mack uploaded patch set 2 09/25/26, 01:46

  3. core-ci voted on patch set 1 V +1 09/25/26, 01:57 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 2 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109198

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

  5. Josua Vogel voted on patch set 2 CR +1 09/25/26, 05:08

  6. Stefan Bürk commented on patch set 2 CR +1 V +1 09/25/26, 06:55

    Indexer.php:254

    Should we not also switch to `mb_substr()` and `mb_strlen()` here ? (Possible followup).
  7. Garvin Hicking commented on patch set 2 CR +1 V +1 09/25/26, 15:24

    Indexer.php:254 Reply

    I think this results in the same $headPart and doesn't matter. Not having mb_ here saves a bit of computing power if all that matters is a string length cutting. (0.02)
  8. Benni Mack commented on patch set 2 CR +2 V +2 09/25/26, 15:38

    Indexer.php:254 Reply

    Done
  9. Benni Mack merged patch set 3 09/25/26, 15:38