I have a textarea
in my html and a button
in bottom.when button press I want to add the content of the textarea
in Database and with JQuery I want to show it in the DOM but this is vulnerable because someone may be write this:
<script> some bad code here </script>
how can I prevent to execute this code while insert in DOM and show it instead of run it(like facebook insert post that show the <script>
tag and don't allow to execute it)
is this vulnerability the only way to attack to textarea form ?