Closed alexey13 closed 5 years ago
Good day! Thank you for awesome work. Love to use lighterhtml with state, actions, view model. I am trying to inject html content from save place but it get stringify by default right? Example
const articleHtml = article => html` <div class="article col-md-6"> <div class="article-header d-flex justify-content-between"> <a href="#" class="article-name">${article.title}</a> </div> <div class="article-body">${article.text}</div> <div class="article-footer text-right"> <button data-id="${article.id}" onclick=${actions.edit} class="btn btn-inverted"></button> </div> </div> `;
Article text is a html content and i want to get it as html and not string. Thanks in advance!
Oh, found an answer. In your comment. Again thanks. ${{html: article.text}}
${{html: article.text}}
Just be sure your output is sanitized/safe/no XSS prone 😉
Good day! Thank you for awesome work. Love to use lighterhtml with state, actions, view model. I am trying to inject html content from save place but it get stringify by default right? Example
Article text is a html content and i want to get it as html and not string. Thanks in advance!