My website is just like Stack Overflow and under development. I am using plain textarea to take text input as I do not have any WMD editor like Stack Overflow's.
When I take HTML code as input and store it in database table in a text or
Another possible solution is to replace the html tags before storing in database. What I did is :-
text=text.replaceAll("<", "<"); text=text.replaceAll(">", ">");
and then stored text in database and its working. Thanks to Bibin Mathew.