I’m pulling post content into a meteor app and the html tags are printing to the page.
What do you mean by “printing to the page”?
You may already know this but I’m storing the results of my API call into a meteor template and then adding that template to my html.
Here’s the template:
Template.layout.curfilm =function(){
var episode = Session.get('episode');
Meteor.call('getFilm',episode,function(err,results){
console.log(results);
Session.set('film',JSON.parse(results.content).content);
})
return (Session.get('film'));
};
and here’s the html:
<h1>
<p>{{curfilm}}</p>
</h1>
I’m expecting the sentence from the content as the following:
“This is the test post content”
but I’m getting:
“<p>This is the test post content</p>”
I’d like to use those tags to format the content. How can I do that?
Thanks for your help.
This sounds like an issue with how you’re outputting curfilm. Not sure what templating language it is, but maybe try {{{curfilm}}} instead.
I was able to use a meteor package that initially strips tags and then you can set it to allow certain tags, keeping the tags in your wp content
https://github.com/copleykj/meteor-tagstripper