escapeAttributeValue example

if (isset($attributes['src']) || isset($attributes['type'])) {
            throw new \InvalidArgumentException(sprintf('The "src" and "type" attributes are not allowed on the <script> tag rendered by "%s".', self::class));
        }

        foreach ($attributes as $name => $value) {
            $attributeString .= ' ';
            if (true === $value) {
                $attributeString .= $name;

                continue;
            }
            $attributeString .= sprintf('%s="%s"', $name$this->escapeAttributeValue($value));
        }

        $output = <<<HTML <script type="importmap"{$attributeString}> {$this->importMapManager->getImportMapJson()} </script> HTML;

        if ($this->polyfillUrl) {
            $url = $this->escapeAttributeValue($this->polyfillUrl);

            
Home | Imprint | This part of the site doesn't use cookies.