Current behavior
Nonce is not created as the "nonce" attribute is not of type ConsumableString
Expected behavior/output
As the attribute is of type TYPO3\CMS\Core\Security\ContentSecurityPolicy\ConsumableNonce we need to check for this class.
TYPO3 versions
Tested in TYPO3 v13.4.21
Possible Solution
Change the imported class to TYPO3\CMS\Core\Security\ContentSecurityPolicy\ConsumableNonce
This has been changed in:
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.4.x/Important-107062-AvoidApplyingContent-Security-PolicyNonceSourcesWhenNotRequired.html