mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Recognise protocols other than "http" in _links_add_base(). Props SergeyBiryukov. Fixes #19665.
Previously "https" URLs used in plugin READMEs displayed by install_plugin_information() would have the plugin's extend URL prepended. git-svn-id: https://develop.svn.wordpress.org/trunk@20466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2981,9 +2981,9 @@ function _links_add_base($m) {
|
||||
global $_links_add_base;
|
||||
//1 = attribute name 2 = quotation mark 3 = URL
|
||||
return $m[1] . '=' . $m[2] .
|
||||
(strpos($m[3], 'http://') === false ?
|
||||
path_join($_links_add_base, $m[3]) :
|
||||
$m[3])
|
||||
( preg_match( '#^(\w{1,20}):#', $m[3], $protocol ) && in_array( $protocol[1], wp_allowed_protocols() ) ?
|
||||
$m[3] :
|
||||
path_join( $_links_add_base, $m[3] ) )
|
||||
. $m[2];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user