diff --git wp-includes/formatting.php wp-includes/formatting.php
index 85d4e7e..4ae9fcb 100644
|
|
|
function esc_url( $url, $protocols = null, $_context = 'display' ) { |
| 3782 | 3782 | * link starting with /, # or ? or a php file). |
| 3783 | 3783 | */ |
| 3784 | 3784 | if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) && |
| 3785 | | ! preg_match('/^[a-z0-9-]+?\.php/i', $url) ) |
| 3786 | | $url = 'http://' . $url; |
| | 3785 | ! preg_match('/^[a-z0-9-]+?\.php/i', $url) ) { |
| | 3786 | $scheme = 'http://'; |
| | 3787 | if ( is_ssl() ) { |
| | 3788 | $response = wp_remote_get( 'https://' . $url ); |
| | 3789 | if ( ! is_wp_error( $response ) && $response['response']['code'] === 200 ) { |
| | 3790 | $scheme = 'https://'; |
| | 3791 | } |
| | 3792 | } |
| | 3793 | $url = $scheme . $url; |
| | 3794 | } |
| 3787 | 3795 | |
| 3788 | 3796 | // Replace ampersands and single quotes only when displaying. |
| 3789 | 3797 | if ( 'display' == $_context ) { |