Ticket #15241: patch-incl-fixed-unit-test.diff
| File patch-incl-fixed-unit-test.diff, 1.5 KB (added by norbertm, 3 years ago) |
|---|
-
wp-testcase/test_includes_formatting.php
403 403 $this->assertEquals('‘test’s quoted’', wptexturize('\'test\'s quoted\'')); 404 404 $this->assertEquals('“test’s quoted”', wptexturize('"test\'s quoted"')); 405 405 } 406 406 407 //WP Tickets #4539, #15241 408 function test_full_sentences_with_unmatched_single_quotes() { 409 $this->assertEquals( 410 'That means every moment you’re working on something without it being in the public it’s actually dying.', 411 wptexturize("That means every moment you're working on something without it being in the public it's actually dying.") 412 ); 413 } 414 407 415 //WP Ticket #4539 408 416 function test_quotes() { 409 417 $this->knownWPBug(4539); -
wordpress/wp-includes/formatting.php
61 61 62 62 '/\'([^\']*)\'([^\']*)\'/' => '‘$1’$2’', // 'test's' 63 63 64 '/(\w)\'(\w)/' => '$1’$2', // test's 65 64 66 '/\'([^\']*)\'/' => '‘$1’', // 'asd' 65 67 '/"([^"]*)"/' => $opening_quote . '$1' . $closing_quote, // "qwe" 66 68 67 '/(\w)\'(\w)/' => '$1’$2', // test's68 69 69 '/(\d)"/' => '$1″', // 9" -> 9″ 70 70 '/(\d)\'/' => '$1′', // 9' -> 9′ 71 71
