Ticket #20750: 20750.2.patch
File 20750.2.patch, 1015 bytes (added by , 12 years ago) |
---|
-
wp-includes/link-template.php
1873 1873 1874 1874 if ( 'relative' == $scheme ) 1875 1875 $url = preg_replace( '#^.+://[^/]*#', '', $url ); 1876 else if ( 'http' != $scheme )1877 $url = str_replace( 'http://', "$scheme://", $url );1876 else 1877 $url = str_replace( array( 'http://', 'https://' ), "$scheme://", $url ); 1878 1878 1879 1879 if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false ) 1880 1880 $url .= '/' . ltrim( $path, '/' ); … … 1938 1938 1939 1939 if ( 'relative' == $scheme ) 1940 1940 $url = preg_replace( '#^.+://[^/]*#', '', $url ); 1941 else if ( 'http' != $scheme )1942 $url = str_replace( 'http://', "{$scheme}://", $url );1941 else 1942 $url = str_replace( array( 'http://', 'https://' ), "$scheme://", $url ); 1943 1943 1944 1944 if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false ) 1945 1945 $url .= '/' . ltrim( $path, '/' );