mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@35497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user