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('‘test’s quoted’', wptexturize('\'test\'s quoted\'')); $this->assertEquals('“test’s quoted”', wptexturize('"test\'s quoted"')); } - + + //WP Tickets #4539, #15241 + function test_full_sentences_with_unmatched_single_quotes() { + $this->assertEquals( + 'That means every moment you’re working on something without it being in the public it’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 @@ '/\'([^\']*)\'([^\']*)\'/' => '‘$1’$2’', // 'test's' + '/(\w)\'(\w)/' => '$1’$2', // test's + '/\'([^\']*)\'/' => '‘$1’', // 'asd' '/"([^"]*)"/' => $opening_quote . '$1' . $closing_quote, // "qwe" - '/(\w)\'(\w)/' => '$1’$2', // test's - '/(\d)"/' => '$1″', // 9" -> 9″ '/(\d)\'/' => '$1′', // 9' -> 9′