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:
shopkeeperdev
2025-10-07 19:03:16 -04:00
parent fcc8697c75
commit 9d6112b703
4 changed files with 39 additions and 3 deletions

View File

@@ -32,7 +32,7 @@
<field id="vendor_mapping" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Vendor Notes</label>
<frontend_model>Shopkeeper\VendorNotes\Block\Adminhtml\Form\Field\VendorMapping</frontend_model>
<backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
<backend_model>Shopkeeper\VendorNotes\Model\Config\Backend\HtmlArraySerialized</backend_model>
<comment>Add vendor names and their corresponding notes. The vendor name must match exactly as it appears in the product attribute.</comment>
</field>
</group>