Index: tests/phpunit/tests/formatting/WPTexturize.php
===================================================================
--- tests/phpunit/tests/formatting/WPTexturize.php	(revision 26979)
+++ tests/phpunit/tests/formatting/WPTexturize.php	(working copy)
@@ -194,4 +194,40 @@
 		$this->assertEquals( ' &#8212;&nbsp;', wptexturize( ' --&nbsp;' ) );
 		$this->assertEquals( '&nbsp;&#8212; ', wptexturize( '&nbsp;-- ') );
 	}
+
+	/**
+	 * Registered shortcodes shouldn't have their content texturized; developers should texturize
+	 * shortcode content within their handler manually.
+	 *
+	 * @ticket 6969
+	 */
+	function test_shortcode_exclusion() {
+		// The only core shortcode that wraps content is [caption]. Other core shortcodes use parameters rather than a wrap.
+		$unfiltered_content = array (
+			'caption' => '[caption]<img src="http://localhost/Great_Wave.jpg" alt="Great Wave" title="Great Wave" width="300" height="205" /> The Great Wave[/caption]',
+			'code'    => '[code lang="php"]$foo = \'bar\';[/code]',          // [code] isn't a core shortcode, but was used as an example in the original Trac ticket.
+			'foobar'  => '[foobar]This is how you "quote" things.[/foobar]', // [foobar] was used as an example in a documented workaround (written by @viper007bond)
+		);
+
+		// Register our foobar and code shortcodes so they exist
+		add_shortcode( 'code',   array( $this, '_dummy_shortcode' ) );
+		add_shortcode( 'foobar', array( $this, '_dummy_shortcode' ) );
+
+		// Act
+
+		$texturized_content = array();
+		foreach( $unfiltered_content as $key => $value ) {
+			$texturized_content[ $key ] = wptexturize( $value );
+		}
+
+		// Verify
+		foreach( $unfiltered_content as $key => $value ) {
+			// Shortcodes should be entirely untouched by wptexturize()
+			$this->assertEquals( $value, $texturized_content[ $key ] );
+		}
+	}
+
+	function _dummy_shortcode( $atts, $content = '' ) {
+		return $content;
+	}
 }
