Fix HTML rendering for vendor notes links
Add proper HTML filtering to render mailto links and formatting in vendor notes. - Create HtmlArraySerialized backend model to prevent HTML escaping - Add filterOutputHtml() method to safely render HTML content - Update template to use HTML filtering - Decode HTML entities before display
This commit is contained in:
@@ -6,23 +6,27 @@ use Magento\Sales\Model\Order;
|
||||
use Magento\Framework\App\Config\ScopeConfigInterface;
|
||||
use Magento\Store\Model\ScopeInterface;
|
||||
use Magento\Framework\Serialize\Serializer\Json;
|
||||
use Magento\Framework\Filter\Template as FilterTemplate;
|
||||
|
||||
class VendorNotes extends Template
|
||||
{
|
||||
protected $_order;
|
||||
protected $_scopeConfig;
|
||||
protected $json;
|
||||
protected $filterTemplate;
|
||||
|
||||
public function __construct(
|
||||
\Magento\Backend\Block\Template\Context $context,
|
||||
\Magento\Sales\Model\Order $order,
|
||||
ScopeConfigInterface $scopeConfig,
|
||||
Json $json,
|
||||
FilterTemplate $filterTemplate,
|
||||
array $data = []
|
||||
) {
|
||||
$this->_order = $order;
|
||||
$this->_scopeConfig = $scopeConfig;
|
||||
$this->json = $json;
|
||||
$this->filterTemplate = $filterTemplate;
|
||||
parent::__construct($context, $data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user