Is it possible to convert html tags to html entities using javascript/jquery using any way possible such as regex or some other way. If yes, then how?
Exampl
If you have the variable and you want to insert it on a div, you can call text().
var myVar = "Some vars Some var extra"; $("div").text(myVar);