mirror of
https://ghproxy.net/https://github.com/wp-cli/scaffold-package-command.git
synced 2025-08-20 22:57:27 +08:00
Improve URL validation for scaffold package readme section
This commit is contained in:
parent
5655856595
commit
1778818a61
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ EOT;
|
|||
$v = '';
|
||||
if ( isset( $composer_obj['extra']['readme'][ $section ][ $k ] ) ) {
|
||||
$v = $composer_obj['extra']['readme'][ $section ][ $k ];
|
||||
if ( false !== strpos( $v, '://' ) ) {
|
||||
if ( filter_var( $v, FILTER_VALIDATE_URL ) === $v ) {
|
||||
$response = Utils\http_request( 'GET', $v );
|
||||
$v = $response->body;
|
||||
} elseif ( preg_match( $ext_regex, $v ) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue