Index: tests/phpunit/tests/formatting/WPTexturize.php
===================================================================
--- tests/phpunit/tests/formatting/WPTexturize.php	(revision 27474)
+++ tests/phpunit/tests/formatting/WPTexturize.php	(working copy)
@@ -184,14 +184,23 @@
 	 * @ticket 23185
 	 */
 	function test_spaces_around_hyphens() {
-		$this->assertEquals( ' &#8211; ', wptexturize( ' - ' ) );
+		$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( ' &#8212; ', wptexturize( ' -- ' ) );
+		$this->assertEquals( ' &#8212; ', wptexturize( ' -- ' ) );
 		$this->assertEquals( '&nbsp;&#8212;&nbsp;', wptexturize( '&nbsp;--&nbsp;' ) );
 		$this->assertEquals( ' &#8212;&nbsp;', wptexturize( ' --&nbsp;' ) );
 		$this->assertEquals( '&nbsp;&#8212; ', wptexturize( '&nbsp;-- ') );
 	}
+
+	/**
+	 * @ticket 20342
+	 */
+	function test_quotes_after_emdash() {
+		$this->assertEquals( '<p>I also remember the line in &#8220;Casey at the Bat&#8221; when he struck out&#8212;&#8220;There is no Joy in Mudville!!!&#8221;</p>', wptexturize( '<p>I also remember the line in "Casey at the Bat" when he struck out---"There is no Joy in Mudville!!!"</p>' ) );
+		$this->assertEquals( 'testing <&#8220;Test Quote&#8221;>', wptexturize( 'testing <"Test Quote">' ) );
+		$this->assertEquals( 'Then he said, &#8220;Try using the &#038;&#8221;', wptexturize( 'Then he said, "Try using the &"' ) );
+	}
 }
