diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget.php b/app/code/Magento/Widget/Block/Adminhtml/Widget.php index dad318f163b4b..ea27d2937925e 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget.php @@ -47,7 +47,7 @@ protected function _construct() 'select_widget_type', 'widget_options', '{$this->getUrl('adminhtml/*/loadOptions')}', - '{$this->escapeJs($this->getRequest()->getParam('widget_target_id'))}' + '{$this->_escaper->escapeJs($this->getRequest()->getParam('widget_target_id'))}' ); }); EOJS; diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php index f10a821c510e1..25cd1bfd47a28 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php @@ -194,7 +194,7 @@ protected function _toHtml() diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php index dc5c456c5eeb2..24c6402169849 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php @@ -97,7 +97,7 @@ protected function _preparelayout() public function getHeaderText() { if ($this->getWidgetInstance()->getId()) { - return __('Widget "%1"', $this->escapeHtml($this->getWidgetInstance()->getTitle())); + return __('Widget "%1"', $this->_escaper->escapeHtml($this->getWidgetInstance()->getTitle())); } else { return __('New Widget Instance'); } diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index a704a5676f632..f45466801151a 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -164,31 +164,31 @@ public function getDisplayOnSelectHtml() protected function _getDisplayOnOptions() { $options = []; - $options[] = ['value' => '', 'label' => $this->escapeHtmlAttr(__('-- Please Select --'))]; + $options[] = ['value' => '', 'label' => $this->_escaper->escapeHtmlAttr(__('-- Please Select --'))]; $options[] = [ 'label' => __('Categories'), 'value' => [ - ['value' => 'anchor_categories', 'label' => $this->escapeHtmlAttr(__('Anchor Categories'))], - ['value' => 'notanchor_categories', 'label' => $this->escapeHtmlAttr(__('Non-Anchor Categories'))], + ['value' => 'anchor_categories', 'label' => $this->_escaper->escapeHtmlAttr(__('Anchor Categories'))], + ['value' => 'notanchor_categories', 'label' => $this->_escaper->escapeHtmlAttr(__('Non-Anchor Categories'))], ], ]; foreach ($this->_productType->getTypes() as $typeId => $type) { $productsOptions[] = [ 'value' => $typeId . '_products', - 'label' => $this->escapeHtmlAttr($type['label']), + 'label' => $this->_escaper->escapeHtmlAttr($type['label']), ]; } array_unshift( $productsOptions, - ['value' => 'all_products', 'label' => $this->escapeHtmlAttr(__('All Product Types'))] + ['value' => 'all_products', 'label' => $this->_escaper->escapeHtmlAttr(__('All Product Types'))] ); - $options[] = ['label' => $this->escapeHtmlAttr(__('Products')), 'value' => $productsOptions]; + $options[] = ['label' => $this->_escaper->escapeHtmlAttr(__('Products')), 'value' => $productsOptions]; $options[] = [ - 'label' => $this->escapeHtmlAttr(__('Generic Pages')), + 'label' => $this->_escaper->escapeHtmlAttr(__('Generic Pages')), 'value' => [ - ['value' => 'all_pages', 'label' => $this->escapeHtmlAttr(__('All Pages'))], - ['value' => 'pages', 'label' => $this->escapeHtmlAttr(__('Specified Page'))], - ['value' => 'page_layouts', 'label' => $this->escapeHtmlAttr(__('Page Layouts'))], + ['value' => 'all_pages', 'label' => $this->_escaper->escapeHtmlAttr(__('All Pages'))], + ['value' => 'pages', 'label' => $this->_escaper->escapeHtmlAttr(__('Specified Page'))], + ['value' => 'page_layouts', 'label' => $this->_escaper->escapeHtmlAttr(__('Page Layouts'))], ], ]; return $options; diff --git a/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml b/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml index 5bb6756bf4ebe..0c1dc347ed3c2 100644 --- a/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml +++ b/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml @@ -4,12 +4,15 @@ * See COPYING.txt for license details. */ -/** @var \Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser $block */ +/** + * @var \Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser $block + * @var \Magento\Framework\Escaper $escaper + */ /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ ?> getId() ?> -
+
getUseMassaction() ? 1 : 0; @@ -25,7 +28,7 @@ $scriptString = <<