Changeset 42228 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 11/26/2017 11:56:25 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r42201 r42228 619 619 if ( ! isset( $regex ) ) { 620 620 $comments = 621 621 '!' // Start of comment, after the <. 622 622 . '(?:' // Unroll the loop: Consume everything until --> is found. 623 623 . '-(?!->)' // Dash not followed by end of comment. … … 627 627 628 628 $cdata = 629 629 '!\[CDATA\[' // Start of comment, after the <. 630 630 . '[^\]]*+' // Consume non-]. 631 631 . '(?:' // Unroll the loop: Consume everything until ]]> is found. … … 636 636 637 637 $escaped = 638 638 '(?=' // Is the element escaped? 639 639 . '!--' 640 640 . '|' … … 648 648 649 649 $regex = 650 650 '/(' // Capture the entire match. 651 651 . '<' // Find start of element. 652 652 . '(?' // Conditional expression follows. … … 679 679 if ( ! isset( $html_regex ) ) { 680 680 $comment_regex = 681 681 '!' // Start of comment, after the <. 682 682 . '(?:' // Unroll the loop: Consume everything until --> is found. 683 683 . '-(?!->)' // Dash not followed by end of comment. … … 687 687 688 688 $html_regex = // Needs replaced with wp_html_split() per Shortcode API Roadmap. 689 689 '<' // Find start of element. 690 690 . '(?(?=!--)' // Is this a comment? 691 691 . $comment_regex // Find end of comment. … … 719 719 $tagregexp = "(?:$tagregexp)(?=[\\s\\]\\/])"; // Excerpt of get_shortcode_regex(). 720 720 $regex = 721 721 '\[' // Find start of shortcode. 722 722 . '[\/\[]?' // Shortcodes may begin with [/ or [[ 723 723 . $tagregexp // Only match registered shortcodes, because performance. … … 819 819 820 820 $pattern = 821 821 '/' 822 822 . '<p>' // Opening paragraph 823 823 . '(?:' . $spaces . ')*+' // Optional leading whitespace … … 2752 2752 2753 2753 if ( preg_match( '%href=["\'](' . preg_quote( set_url_scheme( home_url(), 'http' ) ) . ')%i', $text ) || 2754 preg_match( '%href=["\'](' . preg_quote( set_url_scheme( home_url(), 'https' ) ) . ')%i', $text )2755 ) { 2754 preg_match( '%href=["\'](' . preg_quote( set_url_scheme( home_url(), 'https' ) ) . ')%i', $text ) ) { 2755 2756 2756 return "<a $text>"; 2757 2757 }
Note: See TracChangeset
for help on using the changeset viewer.