Formatting: `wp_make_link_relative()` should return an empty string if no path is present in the link.

Props bcworkz, MikeHansenMe, chriscct7, SergeyBiryukov.
Fixes #26819.
Built from https://develop.svn.wordpress.org/trunk@35497


git-svn-id: http://core.svn.wordpress.org/trunk@35461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-11-03 21:36:25 +00:00
parent 40a58409d8
commit a9d6fa9c7a
2 changed files with 2 additions and 2 deletions

View File

@ -3621,7 +3621,7 @@ function tag_escape( $tag_name ) {
* @return string Absolute path.
*/
function wp_make_link_relative( $link ) {
return preg_replace( '|^(https?:)?//[^/]+(/.*)|i', '$2', $link );
return preg_replace( '|^(https?:)?//[^/]+(/?.*)|i', '$2', $link );
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta2-35496';
$wp_version = '4.4-beta2-35497';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.