Review 10.4 Merged

68314[BUGFIX] Trim locallang label references in LanguageService

Richard Haeser CR +2 V +2 Normal +109 −5 updated 03/09/21, 15:20

Commit message

LanguageService::sL(), also known as the split label function,
is widely used through Core and third-party extensions. It
checks if the given input is a label reference and otherwise
just returns the input.

Since this method is often used with dynamic values, coming
from e.g. XML files, there might be whitespace in the input
string. In such case the label reference can not be resolved,
even if the key is valid, and the input gets returned unchanged.

To prevent this behaviour, LanguageService::sL() now applies
trim() to the input, whenever a specifc strpos() check takes place.

Review

  • Code review CR +2 Done
    • Richard Haeser +2
  • Verified V +2 Done
    • Richard Haeser +2
    • TYPO3com +1 CI
    • core-ci +1 CI

Issues 1

Files 2

Review log 35

  1. Richard Haeser commented on patch set 1 03/09/21, 15:05

    Cherry Picked from branch master.
  2. TYPO3com voted on patch set 1 V +1 03/09/21, 15:15 Completed build in 09m 38s on Tue, 9 Mar, 03:15 PM Test Summary: 75471 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-1179

  3. core-ci voted on patch set 1 V +1 03/09/21, 15:19 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1328

  4. Richard Haeser voted on patch set 1 V +2 CR +2 03/09/21, 15:20

  5. Richard Haeser merged patch set 2 03/09/21, 15:20