Index: C:/Users/sbk/workspace/Wordpress Trunk/wp-includes/formatting.php
===================================================================
--- C:/Users/sbk/workspace/Wordpress Trunk/wp-includes/formatting.php	(revision 6588)
+++ C:/Users/sbk/workspace/Wordpress Trunk/wp-includes/formatting.php	(working copy)
@@ -816,6 +816,12 @@
 		$text = get_the_content('');
 		$text = apply_filters('the_content', $text);
 		$text = str_replace(']]>', ']]&gt;', $text);
+        $search = array('@<script[^>]*?>.*?</script>@si',  // Strip out javascript
+                        '@<style[^>]*?>.*?</style>@siU',    // Strip style tags p$
+                        '@<[\/\!]*?[^<>]*?>@si',            // Strip out HTML tags
+                        '@<![\s\S]*?--[ \t\n\r]*>@'        // Strip multi-line co$
+                );
+        $text = preg_replace($search, '', $text);		
 		$text = strip_tags($text);
 		$excerpt_length = 55;
 		$words = explode(' ', $text, $excerpt_length + 1);

