WordPress.org

Make WordPress Core

Ticket #4116: miqro-4116-tests.php

File miqro-4116-tests.php, 1.0 KB (added by miqrogroove, 6 years ago)
Line 
1        /**
2         * Multiplication pattern in 3.8 will break HTML that contains matching server names or directories.
3         *
4         * @ticket 4116
5         */
6        function test_multiplication_in_urls() {
7                $input  = array();
8                $output = array();
9
10                $input[]  = "www.4x3.com";
11                $output[] = "www.4x3.com";
12
13                $input[]  = "4x3.domain.com";
14                $output[] = "4x3.domain.com";
15
16                $input[]  = "<a href='http://www.24x7.com/'>http://www.24x7.com/</a>";
17                $output[] = "<a href='http://www.24x7.com/'>http://www.24x7.com/</a>";
18
19                $input[]  = "<a href='http://www.domain.com/24x7/'>http://www.domain.com/24x7/</a>";
20                $output[] = "<a href='http://www.domain.com/24x7/'>http://www.domain.com/24x7/</a>";
21
22                foreach($input as $key => $in) {
23                        $this->assertEquals( $output[$key], wptexturize( $in ) );
24                }
25        }