Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    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”?

    Thread Starter crawpdx

    (@crawpdx)

    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.

    Plugin Author Ryan McCue

    (@rmccue)

    This sounds like an issue with how you’re outputting curfilm. Not sure what templating language it is, but maybe try {{{curfilm}}} instead.

    Thread Starter crawpdx

    (@crawpdx)

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘html tags in content- WP REST API plugin’ is closed to new replies.