Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 6588)
+++ 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 properly
+				'@<[\/\!]*?[^<>]*?>@si',            // Strip out HTML tags
+				'@<![\s\S]*?--[ \t\n\r]*>@'        // Strip multi-line comments including CDATA
+		);
+		$text = preg_replace($search, '', $text);
 		$text = strip_tags($text);
 		$excerpt_length = 55;
 		$words = explode(' ', $text, $excerpt_length + 1);

