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

@@ -15,7 +15,7 @@ $notes = $block->getVendorNotes();
<span class="title"><?php echo __('Vendor Note %1', $index + 1); ?></span>
</div>
<div class="vendor-note-content" style="padding: 10px 0; line-height: 1.6;">
<?php echo $note; // Output as HTML for links and multi-lines ?>
<?php echo $this->filterOutputHtml($note); ?>
</div>
</div>
<?php if ($index < count($notes) - 1): ?>
@@ -25,4 +25,4 @@ $notes = $block->getVendorNotes();
</div>
</div>
</section>
<?php endif; ?>
<?php endif; ?>