Ticket #33106: 33106-idea.patch
File 33106-idea.patch, 1.2 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 . '(?:' // Unroll the loop: Consume everything until ]]> is found. 620 . '](?!]>)' // One ] not followed by end of comment. 621 . '[^\]]*+' // Consume non-]. 622 . ')*+' // Loop possessively. 623 . '(?:]]>)?'; // End of comment. If not found, match all input. 624 617 625 $regex = 618 626 '/(' // Capture the entire match. 619 627 . '<' // Find start of element. … … 620 628 . '(?(?=!--)' // Is this a comment? 621 629 . $comments // Find end of comment. 622 630 . '|' 623 . '[^>]*>?' // Find end of element. If not found, match all input. 631 . '(?(?=!\[CDATA\[)' // Is this a comment? 632 . $cdata // Find end of comment. 633 . '|' 634 . '[^>]*>?' // Find end of element. If not found, match all input. 635 . ')' 624 636 . ')' 625 637 . ')/s'; 626 638