Log in
Helper

InlineUtil

Magento\Csp\Helper\InlineUtil

What it does

This helper class provides utilities for rendering HTML tags and event handlers while automatically managing Content Security Policy (CSP) requirements.

Developers use it to safely output inline scripts, styles, and other HTML elements by automatically whitelisting dynamic sources, generating hashes for inline content, or adding nonces to comply with CSP restrictions without manually managing policies.

Public Methods

  • renderTag()
  • renderEventListener()
  • processTag()
  • processEventHandler()