I am writing a plugin which adds a simple option page. On the options page there is a textfield where the user can add a specific script when then will be available in the footer on the front-end using the wp_footer() function.
Now, when the user submits the script to the wp_options table, I assume that the script will need to be sanitized so a possible hacker can't use the textarea field to hack / destroy the database. Is that correct?
If so, how should I go about sanitizing the script?
I would love a practical example.