1
1
<?php
2
2
/**
3
3
* Venustheme
4
- *
4
+ *
5
5
* NOTICE OF LICENSE
6
- *
6
+ *
7
7
* This source file is subject to the Venustheme.com license that is
8
8
* available through the world-wide-web at this URL:
9
9
* http://www.venustheme.com/license-agreement.html
10
- *
10
+ *
11
11
* DISCLAIMER
12
- *
12
+ *
13
13
* Do not edit or add to this file if you wish to upgrade this extension to newer
14
14
* version in the future.
15
- *
15
+ *
16
16
* @category Venustheme
17
17
* @package Ves_Blog
18
18
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -83,14 +83,14 @@ class Add extends \Magento\Framework\App\Action\Action
83
83
84
84
/**
85
85
* [__construct description]
86
- * @param Context $context
87
- * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
88
- * @param \Ves\Blog\Helper\Data $blogHelper
89
- * @param \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory
90
- * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
91
- * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
92
- * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
93
- * @param \Magento\Store\Model\StoreManagerInterface $storeManager
86
+ * @param Context $context
87
+ * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
88
+ * @param \Ves\Blog\Helper\Data $blogHelper
89
+ * @param \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory
90
+ * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
91
+ * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
92
+ * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
93
+ * @param \Magento\Store\Model\StoreManagerInterface $storeManager
94
94
*/
95
95
public function __construct (
96
96
Context $ context ,
@@ -148,6 +148,7 @@ public function execute()
148
148
if (isset ($ data ['content ' ]) && $ allowableTags ) {
149
149
$ data ['content ' ] = strip_tags ($ data ['content ' ], $ allowableTags );
150
150
}
151
+ $ data ['content ' ] = $ this ->_blogHelper ->xss_clean ($ data ['content ' ]);
151
152
152
153
$ model = $ this ->_objectManager ->create ('Ves\Blog\Model\Comment ' );
153
154
$ store = $ this ->_storeManager ->getStore ();
@@ -231,4 +232,4 @@ public function execute()
231
232
}
232
233
return $ resultRedirect ->setRefererOrBaseUrl ();
233
234
}
234
- }
235
+ }
0 commit comments