Ticket #33106: 33106.patch
File 33106.patch, 1.3 KB (added by , 10 years ago) |
---|
-
src/wp-includes/formatting.php
614 614 . ')*+' // Loop possessively. 615 615 . '(?:-->)?'; // End of comment. If not found, match all input. 616 616 617 $cdata = 618 '!\[CDATA\[' // Start of comment, after the <. 619 . '[^\]]*+' // Consume non-]. 620 . '(?:' // Unroll the loop: Consume everything until ]]> is found. 621 . '](?!]>)' // One ] not followed by end of comment. 622 . '[^\]]*+' // Consume non-]. 623 . ')*+' // Loop possessively. 624 . '(?:]]>)?'; // End of comment. If not found, match all input. 625 617 626 $regex = 618 627 '/(' // Capture the entire match. 619 628 . '<' // Find start of element. … … 620 629 . '(?(?=!--)' // Is this a comment? 621 630 . $comments // Find end of comment. 622 631 . '|' 623 . '[^>]*>?' // Find end of element. If not found, match all input. 632 . '(?(?=!\[CDATA\[)' // Is this a comment? 633 . $cdata // Find end of comment. 634 . '|' 635 . '[^>]*>?' // Find end of element. If not found, match all input. 636 . ')' 624 637 . ')' 625 638 . ')/s'; 626 639