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 */ ?> diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml index 22512b9055f95..b424c01b5009a 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml @@ -4,7 +4,11 @@ * See COPYING.txt for license details. */ -/** @var $block \Magento\AdminNotification\Block\System\Messages */ +/** + * @var \Magento\AdminNotification\Block\System\Messages $block + * @var \Magento\Framework\Escaper $escaper + */ + ?> getLastCritical();?> @@ -15,18 +19,18 @@
- escapeHtml(__('System Messages:')) ?> + escapeHtml(__('System Messages:')) ?> getCriticalCount()) : ?>
- + getCriticalCount() ?>
@@ -34,12 +38,12 @@ getMajorCount()) : ?>
- + getMajorCount() ?>
-
+
diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml index 2217d441d96ad..85c06cf3399fb 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml @@ -4,16 +4,20 @@ * See COPYING.txt for license details. */ -/** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ -/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ +/** + * @var \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup $block + * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer + * @var \Magento\Framework\Escaper $escaper + */ + ?>
+ title="escapeHtmlAttr($block->getPopupTitle()) ?>"> diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml index 38398727e0f90..df8d35b88f1fa 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml @@ -4,7 +4,10 @@ * See COPYING.txt for license details. */ -/** @var $this \Magento\AdminNotification\Block\ToolbarEntry */ +/** + * @var $this \Magento\AdminNotification\Block\ToolbarEntry + * @var \Magento\Framework\Escaper $escaper + */ $notificationCount = $block->getUnreadNotificationCount(); $notificationCounterMax = $block->getNotificationCounterMax(); @@ -15,10 +18,10 @@ data-notification-count=""> 0) : ?> $notificationCounterMax) ? (int)$notificationCounterMax . '+' : (int)$notificationCount ?> @@ -26,56 +29,56 @@ + href="escapeUrl($block->getUrl('adminhtml/notification/index')) ?>" + title="escapeHtmlAttr(__('Notifications')) ?>">