I have a chat application wirtten in javascript, when a user enters an html code like
<button>click</button>
a button appears on chat. I use this code
if(message.indexOf('<button') != -1)
{
message = message.replace(message, '-');
}
but this just replaces the < button
with a blank space, I want it to be displayed as text and not an actual button.
Thanks