There are those few times when you want or need JavaScript to be allowed within blocks or nodes. The trick is simply to create a new Input Filter which does not use the HTML Filter.
Designate the filter for use by specific roles, and you’re ready to rock and roll!
You just want to make sure only trusted users can use this input format. Most of the time, only the Admin user will be able to use it.
NOTE: the default Full HTML filter does allow you to post JavaScript. Creating your own additional filter with a unique name is simply be nice way to clearly identify what that filter does.
