2 namespace TYPO3\CMS\Rtehtmlarea\Controller;
30 public $scriptRelPath =
'Classes/Controller/AccessibilityLinkController.php';
60 if (substr($content, 0, 3) !==
'<a ' && substr($content, 0, 5) ===
'<img ') {
63 if (preg_match(
'/^<img .*>/', $content, $matches) === 1) {
64 $attributes = \TYPO3\CMS\Core\Utility\GeneralUtility::get_tag_attributes($matches[0]);
65 if ($attributes[
'src']) {
67 $pageTSConfig = $this->frontendController->getPagesTSconfig();
68 if (is_array($pageTSConfig) && is_array($pageTSConfig[
'RTE.'])) {
69 $classesAnchorConfiguration = $pageTSConfig[
'RTE.'][
'classesAnchor.'];
70 if (is_array($classesAnchorConfiguration)) {
72 $siteUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv(
'TYPO3_SITE_URL');
74 $attributes[
'src'] = substr($attributes[
'src'], strlen($siteUrl));
77 foreach ($classesAnchorConfiguration as $item =>
$conf) {
79 $imagePath = $this->
getFullFileName(trim(str_replace(
'\'',
'', str_replace(
'"',
'',
$conf[
'image']))));
80 if ($attributes[
'src'] === $imagePath) {
82 $content = substr($content, strlen($matches[0]));
103 $newFilename = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath(
$extKey) . $local;
110 return \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath($newFilename);