Store HTML Code in database and retrieve it, escaping < as < ...
Posted on 2011-02-16
I am saving the contents of a textarea in a database. this textarea contains HTML tags.
I pass the data using the POST Method using the function encodeURIComponent(). It is stored normally as %-escaped characters, but when I get the data again from the database, tags like <strong>SOMETHING</strong> becomes <strong>SOMETHING</strong>
What can I do to show the data as it was typed?