String for HTML

0

Good afternoon, I'm not sure if this is the most appropriate title but it's the following ...

I'm using Meteor and mongodb.

I have 2 input, one where I type the name of the website and another that I type the website "www.example.com", which then in javascript I have the following:

var siteCad = '<a href="http://'+ site +'">' + nome + '</a>';

Then I insert the siteCad into a collection of mongoDB. I would like to show these links all of the records inside a , but what is happening is that it shows the whole text, from

asked by anonymous 10.04.2015 / 21:12

1 answer

1

Use with 3 keys:

{{{siteCad}}}

Link: link
3 brackets render an html string without escaping.
Remembering that this could give way to an XSS attack, then use it carefully.

    
16.04.2015 / 02:04