Index: wp-testcase/test_includes_formatting.php
===================================================================
--- wp-testcase/test_includes_formatting.php	(revision 318)
+++ wp-testcase/test_includes_formatting.php	(working copy)
@@ -403,7 +403,15 @@
 		$this->assertEquals('&#8216;test&#8217;s quoted&#8217;', wptexturize('\'test\'s quoted\''));
 		$this->assertEquals('&#8220;test&#8217;s quoted&#8221;', wptexturize('"test\'s quoted"'));
 	}
-	
+
+	//WP Tickets #4539, #15241
+	function test_full_sentences_with_unmatched_single_quotes() {
+		$this->assertEquals(
+			'That means every moment you&#8217;re working on something without it being in the public it&#8217;s actually dying.',
+			wptexturize("That means every moment you're working on something without it being in the public it's actually dying.")
+		);
+	}
+
 	//WP Ticket #4539
 	function test_quotes() {
 		$this->knownWPBug(4539);
Index: wordpress/wp-includes/formatting.php
===================================================================
--- wordpress/wp-includes/formatting.php	(revision 16376)
+++ wordpress/wp-includes/formatting.php	(working copy)
@@ -61,11 +61,11 @@
 			
 			'/\'([^\']*)\'([^\']*)\'/' => '&#8216;$1&#8217;$2&#8217;', // 'test's'
 			
+			'/(\w)\'(\w)/' => '$1&#8217;$2', // test's
+
 			'/\'([^\']*)\'/' => '&#8216;$1&#8217;', // 'asd'
 			'/"([^"]*)"/' => $opening_quote . '$1' . $closing_quote, // "qwe"
 			
-			'/(\w)\'(\w)/' => '$1&#8217;$2', // test's
-			
 			'/(\d)"/' => '$1&#8243;', // 9" -> 9″
 			'/(\d)\'/' => '$1&#8242;', // 9' -> 9′
 			
