I have found a similar post, but my situation is different and I think others could benefit if it's in a different post. My problem is that I have a textarea where people can type anything. I put all the text from the textarea into a variable called "input1" where it is then put into a div to show what the user has typed. my problem is if the user types HTML in the textarea, it will show the HTML in the div. What I have tried is putting the textarea text into the variable "input1" that my system can use, but then from "input1" into "input2" variable, but as a formatted version of the HTML code that will display the HTML but not run it. So if the user types this:
<strong>example text</strong>
I would like it to show this:
<strong>example text</strong>
Not this:
example text