@@ -21,28 +21,33 @@ class Mage_Adminhtml_Block_Notification_Grid_Renderer_Actions extends Mage_Admin
2121 */
2222 public function render (Varien_Object $ row )
2323 {
24- $ readDetailsHtml = ($ row ->getUrl ())
25- ? '<a target="_blank" href=" ' . $ row ->getUrl () . '"> ' .
26- Mage::helper ('adminnotification ' )->__ ('Read Details ' ) . '</a> | '
24+ $ escapedRowUrl = $ this ->escapeUrl ($ row ->getUrl ());
25+ $ readDetailsHtml = ($ escapedRowUrl )
26+ ? '<a target="_blank" href=" ' . $ escapedRowUrl . '"> ' .
27+ $ this ->escapeHtml (Mage::helper ('adminnotification ' )->__ ('Read Details ' )) . '</a> | '
2728 : '' ;
2829
2930 $ markAsReadHtml = (!$ row ->getIsRead ())
3031 ? '<a href=" ' . $ this ->getUrl ('*/*/markAsRead/ ' , ['_current ' => true , 'id ' => $ row ->getId ()]) . '"> ' .
31- Mage::helper ('adminnotification ' )->__ ('Mark as Read ' ) . '</a> | '
32+ $ this -> escapeHtml ( Mage::helper ('adminnotification ' )->__ ('Mark as Read ' ) ) . '</a> | '
3233 : '' ;
3334
35+ $ deleteConfirmHtml = sprintf ("deleteConfirm('%s', this.href) " ,
36+ Mage::helper ('core ' )->jsQuoteEscape (Mage::helper ('adminnotification ' )->__ ('Are you sure? ' )),
37+ );
38+
3439 /** @var Mage_Core_Helper_Url $helper */
3540 $ helper = $ this ->helper ('core/url ' );
3641 return sprintf (
37- '%s%s<a href="%s" onClick="deleteConfirm( \' %s \' , this.href) ; return false;">%s</a> ' ,
42+ '%s%s<a href="%s" onClick="%s ; return false;">%s</a> ' ,
3843 $ readDetailsHtml ,
3944 $ markAsReadHtml ,
4045 $ this ->getUrl ('*/*/remove/ ' , [
4146 '_current ' => true ,
4247 'id ' => $ row ->getId (),
4348 Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $ helper ->getEncodedUrl ()]),
44- Mage:: helper ( ' adminnotification ' )-> __ ( ' Are you sure? ' ) ,
45- Mage::helper ('adminnotification ' )->__ ('Remove ' ),
49+ $ deleteConfirmHtml ,
50+ $ this -> escapeHtml ( Mage::helper ('adminnotification ' )->__ ('Remove ' ) ),
4651 );
4752 }
4853}
0 commit comments