ltsecurityinc安防产品在线商城代码
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<block class="Magento\Framework\View\Element\Template"
|
||||
name="csp_helper"
|
||||
cacheable="false"
|
||||
template="Magento_TestModuleCspUtil::helper.phtml" />
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<block class="Magento\Framework\View\Element\Template"
|
||||
name="csp_helper"
|
||||
cacheable="false"
|
||||
template="Magento_TestModuleCspUtil::helper.phtml" />
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
|
||||
?>
|
||||
<h1>Hello there!</h1>
|
||||
<?= /* @noEscape */ $csp->renderTag('script', ['src' => 'http://my.magento.com/static/script.js']); ?>
|
||||
<?= /* @noEscape */ $csp->renderTag('script', [], "\n let myVar = 1;\n") ?>
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
|
||||
?>
|
||||
<?= /* @NoEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], 'let var = 1; console.log("var = " + var);', false) ?>
|
||||
<?= /* @NoEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript', 'src' => 'https://magento.com/scripts/some-script.js']) ?>
|
||||
Reference in New Issue
Block a user