You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constr=window.r=newRactive({el: '#main',template: `<p>{{{html}}}</p>`,data: {html: `<pre><code>This is <strong>legit</strong>!</code></pre>`}});console.log(`Should be:<p><pre><code>This is <strong>legit</strong>!</code></pre></p>`)console.log(`Actually is:${r.toHTML()}`)// => <p><pre><code>This is <strong>legit</strong>!</code></pre></p>
The text was updated successfully, but these errors were encountered:
It looks like there were some tests added to make sure triples worked in attributes, but there wasn't coverage for non-attribute triples. This is now fixed in edge and v0.8-dev. It'll go out with 0.8.11 when it gets cut. Thanks for the report!
Use good old replace() instead of Ractive's {{{html}}} triple-curlies to embed the content.
This hack can be undone once Ractive 0.8.11 is released, as per ractivejs/ractive#2882
Description:
I'm using triple-curly braces to embed HTML into another template.
When that embedded HTML contains encoded HTML entities, they are incorrectly decoded in the
toHTML()
output string.When output to the DOM, everything works fine. The issue only happens with
toHTML()
.Versions affected:
Introduced in 0.5.8, still in 0.8.10
Reproduction:
https://jsfiddle.net/qLz7j56t/2/
Code:
The text was updated successfully, but these errors were encountered: