I'm working on a code generator and I am wondering if I can inject javascript into a text box USING javscript.
I do not want the injected javascript to be executed, and I'm worried that the quotes in the string may cause errors.
For example, I want to inject this script:
$('#click').function(){
$('#thing').html('<a href="user.php">User</a>');
}
into this textbox:
<textarea rows="3" cols="20" id="textbox">
</textarea>
Using javascript(jQuery)'s .html().
How can I achieve that?