html5 - JSON not picking up <br> -
i have webpage uses json files content, reason, not json elements picking html entity <br>and cannot figure out why...
"pages": [{ "title": "title", "intro": "lorum<br>ipsm", "content": [ { "title": "title 2", "text": [ {"content": "lorum<br>ipsm"} ] },... the <br> in "content" shown line break, in "intro"it's not... can cause of strange behavior?
i call json using html:
<article class="a_page"> <section class="left"> <header> <h1>{{title}}</h1> </header> <section> <p>{{intro}}</p> </section> </section> <section class="right"> {{#content}} <section> <h2>{{title}}</h2> <section> {{#text}} <section> <!--<h3>{{title}}</h3>--> <p>{{{content}}}</p> </section> {{/text}} </section> </section> {{/content}} </section> </article>
mustache.js documentation says should enclose text tags in triple curly braces. use
{{{intro}}} instead of
{{intro}}
Comments
Post a Comment