Drupal, like most Content Management Systems, has security systems in place to filter most javascript during submission so site members can’t do ugly things via scripting. In most cases, that’s a good thing. When you’re scratching your head trying to figure out a way around it, not so much.
You can hard-code a script into the template, if you need it on all the pages and it works. But just adding a a single, inline javascript into a Drupal node is not as easy as it seems.
There may well be a prettier way to do this, but here is a quick way out in case you need it:
First, put the script on your server, someplace it’s easy to find. I usually have a “scripts” folder in my sites/all folder.
Second, when do your post, set your input filter to PHP
Third, do a php include where you’d like to place the script. Something like this:
<?php include('sites/all/scripts/my_javascript.js'); ?>
And there you go. Inline javascript. I guess in the most common scenarios Drupal is used for, having <script>
available without filtering would be very foolish security wise. Unfiltered js in a webform makes for a very insecure setup.