[BUGFIX] HTML in flash messages in FileList 29/44629/4
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 9 Nov 2015 10:18:16 +0000 (11:18 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 9 Nov 2015 13:18:31 +0000 (14:18 +0100)
Resolves: #71424
Releases: master
Change-Id: I3463bfa231e31a2d98f980fbeebdaa045975aff4
Reviewed-on: https://review.typo3.org/44629
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php

index 50fb1f8..1d346df 100644 (file)
@@ -418,23 +418,13 @@ class ExtendedFileUtility extends BasicFileUtility
                 $shortcutContent = array();
                 $brokenReferences = array();
 
-                $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                 foreach ($refIndexRecords as $fileReferenceRow) {
                     if ($fileReferenceRow['tablename'] === 'sys_file_reference') {
                         $row = $this->transformFileReferenceToRecordReference($fileReferenceRow);
                         $shortcutRecord = BackendUtility::getRecord($row['tablename'], $row['recuid']);
 
                         if ($shortcutRecord) {
-                            $icon = $iconFactory->getIconForRecord($row['tablename'], $shortcutRecord, Icon::SIZE_SMALL)->render();
-                            $tagParameters = array(
-                                'class'           => 't3-js-clickmenutrigger',
-                                'data-table'      => $row['tablename'],
-                                'data-uid'        => $row['recuid'],
-                                'data-listframe'  => 1,
-                                'data-iteminfo'   => '%2Binfo,history,edit'
-                            );
-                            $icon = '<a href="#" ' . GeneralUtility::implodeAttributes($tagParameters, true) . '>' . $icon . '</a>';
-                            $shortcutContent[] = $icon . htmlspecialchars((BackendUtility::getRecordTitle($row['tablename'], $shortcutRecord) . '  [' . BackendUtility::getRecordPath($shortcutRecord['pid'], '', 80) . ']'));
+                            $shortcutContent[] = '[record:' . $row['tablename'] . ':' .  $row['recuid'] . ']';
                         } else {
                             $brokenReferences[] = $fileReferenceRow['ref_uid'];
                         }
@@ -455,7 +445,7 @@ class ExtendedFileUtility extends BasicFileUtility
                     // render a message that the file could not be deleted
                     $flashMessage = GeneralUtility::makeInstance(
                         FlashMessage::class,
-                        sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.description.fileNotDeletedHasReferences'), $fileObject->getName()) . '<br />' . implode('<br />', $shortcutContent),
+                        sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.description.fileNotDeletedHasReferences'), $fileObject->getName()) . ' ' . implode(', ', $shortcutContent),
                         $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.header.fileNotDeletedHasReferences'),
                         FlashMessage::WARNING,
                         true