Index: src/wp-includes/shortcodes.php
===================================================================
--- src/wp-includes/shortcodes.php	(revision 38519)
+++ src/wp-includes/shortcodes.php	(working copy)
@@ -583,9 +583,10 @@
  * @global array $shortcode_tags
  *
  * @param string $content Content to remove shortcode tags.
+ * @param array $tag_array Optional. Array of tags to remove.
  * @return string Content without shortcode tags.
  */
-function strip_shortcodes( $content ) {
+function strip_shortcodes( $content, $tag_array = false ) {
 	global $shortcode_tags;
 
 	if ( false === strpos( $content, '[' ) ) {
@@ -597,8 +598,21 @@
 
 	// Find all registered tag names in $content.
 	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
-	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
 
+	// If $tag_array is set, then use this instead of global
+	$array_to_check = $shortcode_tags;
+	if($tag_array){
+		if(isset($tag_array[ 0 ])){
+			$array_to_check = $tag_array;
+		} else {
+			$array_to_check = array_keys( $tag_array );
+		}
+	} else {
+		$array_to_check = array_keys( $shortcode_tags );
+	}
+
+	$tagnames = array_intersect($array_to_check, $matches[1] );
+
 	if ( empty( $tagnames ) ) {
 		return $content;
 	}
Index: tests/phpunit/tests/shortcode.php
===================================================================
--- tests/phpunit/tests/shortcode.php	(revision 38519)
+++ tests/phpunit/tests/shortcode.php	(working copy)
@@ -340,13 +340,46 @@
 		$this->assertEquals( $test_string, shortcode_unautop( wpautop( $test_string ) ) );
 	}
 
+
+	function _foobar_func( $atts ){
+		return "foo and bar";
+	}
+	
+
 	/**
 	 * @ticket 10326
 	 */
 	function test_strip_shortcodes() {
+		add_shortcode( 'foobar', '_foobar_func' );
+
 		$this->assertEquals('before', strip_shortcodes('before[gallery]'));
 		$this->assertEquals('after', strip_shortcodes('[gallery]after'));
 		$this->assertEquals('beforeafter', strip_shortcodes('before[gallery]after'));
+		$this->assertEquals('before[after', strip_shortcodes('before[after'));
+		$this->assertEquals('beforeafter', strip_shortcodes('beforeafter'));
+		$this->assertEquals('beforeafter', strip_shortcodes('before[gallery id="123" size="medium"]after'));
+		$this->assertEquals('before[unregistered_shortcode]after', strip_shortcodes('before[unregistered_shortcode]after'));
+		$this->assertEquals('beforeafter', strip_shortcodes('before[foobar]after'));
+		$this->assertEquals('before  after', strip_shortcodes('before [foobar]content[/foobar] after'));
+		$this->assertEquals('before  after', strip_shortcodes('before [foobar id="123"]content[/foobar] after'));
+		
+		$this->assertEquals('before after', strip_shortcodes('[gallery]before [foobar]after',
+			array( 'gallery' => '_gallery_func', 'foobar' => '_foobar_func' )
+		));
+
+		$this->assertEquals('before [foobar]after', strip_shortcodes('[gallery]before [foobar]after',
+			array( 'gallery' => '_gallery_func' )
+		));
+
+		$this->assertEquals('before after', strip_shortcodes('[gallery]before [foobar]after',
+			array( 'gallery', 'foobar' )
+		));
+
+		$this->assertEquals('before [foobar]after', strip_shortcodes('[gallery]before [foobar]after',
+			array( 'gallery' )
+		));
+
+		remove_shortcode( 'foobar' );
 	}
 
 
