I am using jQuery and prototype libarary fro this project.
I have this code so far:
HTML:
<div id="cnt"></div> <input type ="text" id="bla" name="tct"/>
Javascript:
if(e.keycode == 13){
var text = document.getElementById('#bla');
text= $('#bla').val();
//text.evaljson();
//I put a comment because it gives me error "badly formed json string"
$('#cnt').append(text);
}
When I place some code like <script> alert('hello world');</script> it gets executed.
How can I remove it?