Providing HTML formatted mango documents

So here's the scenario.

I have one message box on my page. And I am displaying message lines from the collection in this field.

Template.HomePage.Messages = function(){
   var  Messages = MessageCollection.find({raceId: Session.get('race_id')});
      if(Messages.count() > 0){
         return Messages;
      }
}

      

The collection contains a bunch of messages as strings and is simply displayed through a block {{#each}}

.

And the question is, how can I display posts with HTML markup in it?

For example, If the line is:

Hello <b> how are you? </b>

      

This should display as:

Hello, how are you?

It currently displays all html tags in strings. How can i do this?

+3


source to share


1 answer


Use {{{value}}}

instead {{value}}

.



+7


source







All Articles