Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In the normal way, it's just text. It only becomes "script" when you ask a script interpreter to interpret it (or a compiler to compile it; these lines are getting blurrier and blurrier). So you can include it in your form in exactly the same way you would if it were where someone should type anything else&nbsp;&mdash; a forum post, a question, an answer, a brief description of their job, a love letter... :-)</p> <p><strong>Edit</strong> Re your edit follow-up, what you need to do is properly pre-process the text. This doesn't only relate to script, you run into issues with normal text too. Here are some links addressing this in the context of SQL injection attacks, but the techniques are the same whether you're defending against SQL injection or just trying to support having a single quote in someone's name.</p> <p>Starting with a fun comic:</p> <p><a href="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" rel="nofollow noreferrer">http://imgs.xkcd.com/comics/exploits_of_a_mom.png</a></p> <p>...and then referencing some useful stuff:</p> <p><a href="http://en.wikipedia.org/wiki/Sql_injection" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Sql_injection</a></p> <p><a href="https://stackoverflow.com/questions/149848/classic-asp-sql-injection-protection">Classic ASP SQL Injection Protection</a></p> <p><a href="https://stackoverflow.com/questions/2200256/how-can-i-avoid-sql-injection-attacks">How can I avoid SQL injection attacks?</a></p> <p><a href="https://stackoverflow.com/questions/139199/can-i-protect-against-sql-injection-by-escaping-single-quote-and-surrounding-user">Can I protect against SQL Injection by escaping single-quote and surrounding user input with single-quotes?</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload