$("#id").append(dataHtml);
when injected with <script>alert('test)</script> an alert box appears on the screen showing test.I encoded the html but then it appeared as plain text.
I get the value of dataHtml from database.Because of some reasons I have to do this all on the client side using javascript/jquery.
How do i ignore such tags/injection while maintaing the html?