js-code as parameter

J

josh

hi all

a php script is generating the following:
<script> printOut('abcdef'); </script>

printOut does document.write(out);

the problem is, this function doesn't work correct when there are
<script> tags in the parameter. so i cant call it with:
printOut('<script>alert(1)</script>Click OK');

what do i have to do to make the printOut function working correctly?

thx for any help

josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top