Changeset 45994 for branches/4.9/src/wp-includes/formatting.php
- Timestamp:
- 09/04/2019 05:47:09 PM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/formatting.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/formatting.php
r44836 r45994 2748 2748 function wp_rel_nofollow_callback( $matches ) { 2749 2749 $text = $matches[1]; 2750 $atts = shortcode_parse_atts( $matches[1]);2750 $atts = wp_kses_hair( $matches[1], wp_allowed_protocols() ); 2751 2751 $rel = 'nofollow'; 2752 2752 2753 2753 if ( ! empty( $atts['href'] ) ) { 2754 if ( in_array( strtolower( wp_parse_url( $atts['href'] , PHP_URL_SCHEME ) ), array( 'http', 'https' ), true ) ) {2755 if ( strtolower( wp_parse_url( $atts['href'] , PHP_URL_HOST ) ) === strtolower( wp_parse_url( home_url(), PHP_URL_HOST ) ) ) {2754 if ( in_array( strtolower( wp_parse_url( $atts['href']['value'], PHP_URL_SCHEME ) ), array( 'http', 'https' ), true ) ) { 2755 if ( strtolower( wp_parse_url( $atts['href']['value'], PHP_URL_HOST ) ) === strtolower( wp_parse_url( home_url(), PHP_URL_HOST ) ) ) { 2756 2756 return "<a $text>"; 2757 2757 } … … 2760 2760 2761 2761 if ( ! empty( $atts['rel'] ) ) { 2762 $parts = array_map( 'trim', explode( ' ', $atts['rel'] ) );2762 $parts = array_map( 'trim', explode( ' ', $atts['rel']['value'] ) ); 2763 2763 if ( false === array_search( 'nofollow', $parts ) ) { 2764 2764 $parts[] = 'nofollow'; … … 2769 2769 $html = ''; 2770 2770 foreach ( $atts as $name => $value ) { 2771 $html .= "{$name}=\"" . esc_attr( $value ) . "\" "; 2771 if ( isset( $value['vless'] ) && 'y' === $value['vless'] ) { 2772 $html .= $name . ' '; 2773 } else { 2774 $html .= "{$name}=\"" . esc_attr( $value['value'] ) . '" '; 2775 } 2772 2776 } 2773 2777 $text = trim( $html );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)