MenuLinkTestWithUnsafeTitle.php in Zircon Profile 8.0
File
core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/MenuLinkTestWithUnsafeTitle.php
View source
<?php
namespace Drupal\menu_test\Plugin\Derivative;
use Drupal\Component\Plugin\Derivative\DeriverBase;
class MenuLinkTestWithUnsafeTitle extends DeriverBase {
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives['unsafe'] = [
'title' => '<script>alert("Even more wild animals")</script>',
'menu_name' => 'tools',
] + $base_plugin_definition;
return $this->derivatives;
}
}