Index: src/wp-includes/formatting.php
===================================================================
--- src/wp-includes/formatting.php	(revision 27852)
+++ src/wp-includes/formatting.php	(working copy)
@@ -70,8 +70,8 @@
 			$cockney = $cockneyreplace = array();
 		}
 
-		$static_characters = array_merge( array( '---', ' -- ', '--', ' - ', 'xn&#8211;', '...', '``', '\'\'', ' (tm)' ), $cockney );
-		$static_replacements = array_merge( array( $em_dash, ' ' . $em_dash . ' ', $en_dash, ' ' . $en_dash . ' ', 'xn--', '&#8230;', $opening_quote, $closing_quote, ' &#8482;' ), $cockneyreplace );
+		$static_characters = array_merge( array( '---', '...', '``', '\'\'', ' (tm)' ), $cockney );
+		$static_replacements = array_merge( array( $em_dash, '&#8230;', $opening_quote, $closing_quote, ' &#8482;' ), $cockneyreplace );
 
 		/*
 		 * Regex for common whitespace characters.
@@ -126,6 +126,11 @@
 			$dynamic[ '/\'(?=\Z|\.|' . $spaces . ')/' ] = $closing_single_quote;
 		}
 
+		// Dashes and spaces
+		$dynamic[ '/(?<=' . $spaces . ')--(?=' . $spaces . ')/' ] = $em_dash;
+		$dynamic[ '/(?<!xn)--/' ] = $en_dash;
+		$dynamic[ '/(?<=' . $spaces . ')-(?=' . $spaces . ')/' ] = $en_dash;
+
 		$dynamic_characters = array_keys( $dynamic );
 		$dynamic_replacements = array_values( $dynamic );
 	}
Index: tests/phpunit/tests/formatting/WPTexturize.php
===================================================================
--- tests/phpunit/tests/formatting/WPTexturize.php	(revision 27852)
+++ tests/phpunit/tests/formatting/WPTexturize.php	(working copy)
@@ -187,15 +187,23 @@
 	 * @ticket 23185
 	 */
 	function test_spaces_around_hyphens() {
+		$nbsp = "\xC2\xA0";
+
 		$this->assertEquals( ' &#8211; ', wptexturize( ' - ' ) ); 
 		$this->assertEquals( '&nbsp;&#8211;&nbsp;', wptexturize( '&nbsp;-&nbsp;' ) );
 		$this->assertEquals( ' &#8211;&nbsp;', wptexturize( ' -&nbsp;' ) );
 		$this->assertEquals( '&nbsp;&#8211; ', wptexturize( '&nbsp;- ') );
+		$this->assertEquals( "$nbsp&#8211;$nbsp", wptexturize( "$nbsp-$nbsp" ) );
+		$this->assertEquals( " &#8211;$nbsp", wptexturize( " -$nbsp" ) );
+		$this->assertEquals( "$nbsp&#8211; ", wptexturize( "$nbsp- ") );
 
 		$this->assertEquals( ' &#8212; ', wptexturize( ' -- ' ) ); 
 		$this->assertEquals( '&nbsp;&#8212;&nbsp;', wptexturize( '&nbsp;--&nbsp;' ) );
 		$this->assertEquals( ' &#8212;&nbsp;', wptexturize( ' --&nbsp;' ) );
 		$this->assertEquals( '&nbsp;&#8212; ', wptexturize( '&nbsp;-- ') );
+		$this->assertEquals( "$nbsp&#8212;$nbsp", wptexturize( "$nbsp--$nbsp" ) );
+		$this->assertEquals( " &#8212;$nbsp", wptexturize( " --$nbsp" ) );
+		$this->assertEquals( "$nbsp&#8212; ", wptexturize( "$nbsp-- ") );
 	}
 
 	/**
@@ -929,11 +937,15 @@
 			),
 			array(
 				"word xn&#8211; word",
-				"word xn-- word",
+				"word xn&#8211; word",
 			),
 			array(
 				"wordxn&#8211;word",
+				"wordxn&#8211;word",
+			),
+			array(
 				"wordxn--word",
+				"wordxn--word",
 			),
 		);
 	}
