How to prevent Knockout escaping HTML?

html
knockout
(Dmitry Fedyuk) #1

Use ko html: instead of ko text: and data-bind="html: instead of data-bind="text:

1. An example of «data-bind="html:»

https://github.com/magento/magento2/blob/1464a2c/app/code/Magento/Braintree/view/frontend/web/template/payment/form.html#L100-L102

2 An example of «ko html:»

Magento 2 core never uses this syntax, but it does work:

<div class="field-tooltip-content" data-target="dropdown">
   <!-- ko html: tooltip.description --><!-- /ko -->
</div>
0 Likes

How do I add a link to a form input tooltip in checkout?