Index: wp-content/themes/default/searchform.php
===================================================================
--- wp-content/themes/default/searchform.php	(revision 9233)
+++ wp-content/themes/default/searchform.php	(working copy)
@@ -1,12 +0,0 @@
-<?php
-/**
- * @package WordPress
- * @subpackage Default_Theme
- */
-?>
-<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
-<label class="hidden" for="s"><?php _e('Search for:'); ?></label>
-<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
-<input type="submit" id="searchsubmit" value="Search" />
-</div>
-</form>
Index: wp-content/themes/default/archives.php
===================================================================
--- wp-content/themes/default/archives.php	(revision 9233)
+++ wp-content/themes/default/archives.php	(working copy)
@@ -12,7 +12,7 @@
 
 <div id="content" class="widecolumn">
 
-<?php include (TEMPLATEPATH . '/searchform.php'); ?>
+<?php get_search_form(); ?>
 
 <h2>Archives by Month:</h2>
 	<ul>
Index: wp-content/themes/default/search.php
===================================================================
--- wp-content/themes/default/search.php	(revision 9233)
+++ wp-content/themes/default/search.php	(working copy)
@@ -37,7 +37,7 @@
 	<?php else : ?>
 
 		<h2 class="center">No posts found. Try a different search?</h2>
-		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
+		<?php get_search_form(); ?>
 
 	<?php endif; ?>
 
Index: wp-content/themes/default/index.php
===================================================================
--- wp-content/themes/default/index.php	(revision 9233)
+++ wp-content/themes/default/index.php	(working copy)
@@ -34,7 +34,7 @@
 
 		<h2 class="center">Not Found</h2>
 		<p class="center">Sorry, but you are looking for something that isn't here.</p>
-		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
+		<?php get_search_form(); ?>
 
 	<?php endif; ?>
 
Index: wp-content/themes/default/sidebar.php
===================================================================
--- wp-content/themes/default/sidebar.php	(revision 9233)
+++ wp-content/themes/default/sidebar.php	(working copy)
@@ -9,7 +9,7 @@
 			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
 					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
 			<li>
-				<?php include (TEMPLATEPATH . '/searchform.php'); ?>
+				<?php get_search_form(); ?>
 			</li>
 
 			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
Index: wp-content/themes/default/archive.php
===================================================================
--- wp-content/themes/default/archive.php	(revision 9233)
+++ wp-content/themes/default/archive.php	(working copy)
@@ -63,7 +63,7 @@
 			printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", get_userdatabylogin(get_query_var('author_name'))->display_name);
 		else
 			echo("<h2 class='center'>No posts found.</h2>");
-		include (TEMPLATEPATH . '/searchform.php');
+		get_search_form();
 
 	endif;
 ?>
Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 9233)
+++ wp-includes/general-template.php	(working copy)
@@ -93,6 +93,20 @@
 		load_template( get_theme_root() . '/default/sidebar.php');
 }
 
+function get_search_form() {
+	do_action( 'get_search' );
+	if('' == locate_template(array('searchform.php'), true))
+	{
+		$form = '<form method="get" id="searchform" action="' . get_option('siteurl') . '/" >
+		<label class="hidden" for="s">' . __('Search for:') . '</label>
+		<div><input type="text" value="' . the_search_query() . '" name="s" id="s" />
+		<input type="submit" id="searchsubmit" value="Search" />
+		</div>
+		</form>';
+	}
+	echo apply_filters('get_searchform', $form);
+}
+
 /**
  * Display the Log In/Out link.
  *
Index: wp-includes/widgets.php
===================================================================
--- wp-includes/widgets.php	(revision 9233)
+++ wp-includes/widgets.php	(working copy)
@@ -763,21 +763,11 @@
  */
 function wp_widget_search($args) {
 	extract($args);
-	$searchform_template = get_template_directory() . '/searchform.php';
-
 	echo $before_widget;
 
 	// Use current theme search form if it exists
-	if ( file_exists($searchform_template) ) {
-		include_once($searchform_template);
-	} else { ?>
-		<form id="searchform" method="get" action="<?php bloginfo('url'); ?>/"><div>
-			<label class="hidden" for="s"><?php _e('Search for:'); ?></label>
-			<input type="text" name="s" id="s" size="15" value="<?php the_search_query(); ?>" />
-			<input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" />
-		</div></form>
-	<?php }
-
+	get_search_form();
+	
 	echo $after_widget;
 }
 
