Issue Bug Closed

#88402Systeminformation toolbar - renders png/svg icons not correctly

Christian Hackl 05/20/19, 18:22 updated 05/12/20, 13:08

Description

Extending the system information toolbar with a png-icon, renders following:

‘‘

- ‘src’attribute is missing.
xlink:href have the correct path.
- xlink:href is depricated – https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

TYPO3 9.5.7

// ext_localconf.php ...
$iconRegistry->registerIcon(
  'test-icon',
  \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
  ['source' => "EXT:{$extensionKey}/Resources/Public/Images/BackendIcons/myIcon.png"]
);
// ToolbarItem.php ...
public function addVersionInformation(SystemInformationToolbarItem $systemInformation) {

  //...

  $systemInformation->addSystemInformation(
    'My Title',
    htmlspecialchars($value, ENT_QUOTES | ENT_HTML5),
    'test-icon'
  );
}

Reviews 1