diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php
index f74f62ef000e6..e336047d5796d 100644
--- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php
+++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php
@@ -46,7 +46,7 @@ public function __construct(Context $context, Data $urlHelper, array $data = [])
public function render(DataObject $row)
{
$readDetailsHtml = $row->getUrl() ? '' .
__('Read Details') . '' : '';
diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php
index 4aa5d90e08014..e19e18febad75 100644
--- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php
+++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php
@@ -26,8 +26,8 @@ class Notice extends AbstractRenderer
public function render(DataObject $row)
{
return '' .
- $this->escapeHtml($row->getTitle()) .
+ $this->_escaper->escapeHtml($row->getTitle()) .
'' .
- ($row->getDescription() ? '
' . $this->escapeHtml($row->getDescription()) : '');
+ ($row->getDescription() ? '
' . $this->_escaper->escapeHtml($row->getDescription()) : '');
}
}
diff --git a/app/code/Magento/AdminNotification/Block/Window.php b/app/code/Magento/AdminNotification/Block/Window.php
index e9b4bfa44893d..95a7ec865c3b8 100644
--- a/app/code/Magento/AdminNotification/Block/Window.php
+++ b/app/code/Magento/AdminNotification/Block/Window.php
@@ -80,11 +80,11 @@ public function __construct(
protected function _toHtml()
{
if ($this->canShow()) {
- $this->setHeaderText($this->escapeHtml(__('Incoming Message')));
- $this->setCloseText($this->escapeHtml(__('close')));
- $this->setReadDetailsText($this->escapeHtml(__('Read Details')));
- $this->setNoticeMessageText($this->escapeHtml($this->_getLatestItem()->getTitle()));
- $this->setNoticeMessageUrl($this->escapeUrl($this->_getLatestItem()->getUrl()));
+ $this->setHeaderText($this->_escaper->escapeHtml(__('Incoming Message')));
+ $this->setCloseText($this->_escaper->escapeHtml(__('close')));
+ $this->setReadDetailsText($this->_escaper->escapeHtml(__('Read Details')));
+ $this->setNoticeMessageText($this->_escaper->escapeHtml($this->_getLatestItem()->getTitle()));
+ $this->setNoticeMessageUrl($this->_escaper->escapeUrl($this->_getLatestItem()->getUrl()));
$this->setSeverityText('critical');
return parent::_toHtml();
}
diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
index f2e8e96fa2585..81592af48ee2d 100644
--- a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
+++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
@@ -7,6 +7,7 @@
/**
* @see \Magento\AdminNotification\Block\Window
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ * @var \Magento\Framework\Escaper $escaper
*/
?>