Skip to content

Commit

Permalink
[BUGFIX] Wrong language labels in StandardContentPreviewRenderer
Browse files Browse the repository at this point in the history
The language labels for `noPluginSelected` and `edit` in
StandardContentPreviewRenderer can not be resolved, because the
extension path is wrong.

This change fixes the extension path and additionally streamlines
one label output, by using `htmlspecialchars` to escape the
generated label similar to the other label output in this class.

Additionally a similar wrong extension path in
`ExampleLinkType.rst.txt` has been adapted.

Resolves: #103095
Related: #100675
Releases: main, 12.4
Change-Id: I4882133025c938fc3b6928b36237e782e9465dcc
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82884
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk <stefan@buerk.tech>
  • Loading branch information
derhansen authored and sbuerk committed Feb 10, 2024
1 parent 7563b13 commit b0ce20c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -153,7 +153,7 @@ public function renderPageModulePreviewContent(GridColumnItem $item): string
$out .= '<div class="alert alert-danger">' . htmlspecialchars($message) . '</div>';
}
} else {
$out .= '<div class="alert alert-warning">' . $languageService->sL('LLL:EXT:typo3/sysext/backend/Resources/Private/Language/locallang_layout.xlf:noPluginSelected') . '</div>';
$out .= '<div class="alert alert-warning">' . htmlspecialchars($languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:noPluginSelected')) . '</div>';
}
break;
default:
Expand Down Expand Up @@ -379,7 +379,7 @@ protected function linkEditContent(string $linkText, $row): string
];
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$url = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);
return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:typo3/sysext/backend/Resources/Private/Language/locallang_layout.xlf:edit')) . '">' . $linkText . '</a>';
return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:edit')) . '">' . $linkText . '</a>';
}
return $linkText;
}
Expand Down
Expand Up @@ -19,11 +19,11 @@
$lang = $this->getLanguageService();
switch ($errorParams['errno'] ?? 0) {
case 404:
$message = $lang->sL('LLL:EXT:typo3/sysext/linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pagenotfound404');
$message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pagenotfound404');
break;
default:
// fall back to generic error message
$message = sprintf($lang->sL('LLL:EXT:typo3/sysext/linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.externalerror'), $errorParams['errno']);
$message = sprintf($lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.externalerror'), $errorParams['errno']);
}
return $message;
}
Expand Down

0 comments on commit b0ce20c

Please sign in to comment.