| | 6 | |
| | 7 | Here's a dead simple test case to use: |
| | 8 | |
| | 9 | {{{#!diff |
| | 10 | --- tests/phpunit/tests/formatting/Autop.php (revision 36998) |
| | 11 | +++ tests/phpunit/tests/formatting/Autop.php (working copy) |
| | 12 | @@ -524,4 +524,21 @@ |
| | 13 | $this->assertEquals( $expected, trim( wpautop( $content ) ) ); |
| | 14 | } |
| | 15 | |
| | 16 | + /** |
| | 17 | + * wpautop() should skip HTML comments |
| | 18 | + * |
| | 19 | + * @ticket 33645 |
| | 20 | + */ |
| | 21 | + function test_that_wpautop_skips_html_comments() { |
| | 22 | + $content = ' |
| | 23 | + <!-- .column .something --> |
| | 24 | +'; |
| | 25 | + |
| | 26 | + $expected = ' |
| | 27 | +<!-- .column .something --> |
| | 28 | +'; |
| | 29 | + |
| | 30 | + $this->assertEquals( $expected, trim( wpautop( $content ) ) ); |
| | 31 | + } |
| | 32 | + |
| | 33 | } |
| | 34 | }}} |