Make WordPress Core

Changeset 20466


Ignore:
Timestamp:
04/14/2012 07:14:10 PM (13 years ago)
Author:
duck_
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r20443 r20466  
    29822982    //1 = attribute name  2 = quotation mark  3 = URL
    29832983    return $m[1] . '=' . $m[2] .
    2984         (strpos($m[3], 'http://') === false ?
    2985             path_join($_links_add_base, $m[3]) :
    2986             $m[3])
     2984        ( preg_match( '#^(\w{1,20}):#', $m[3], $protocol ) && in_array( $protocol[1], wp_allowed_protocols() ) ?
     2985            $m[3] :
     2986            path_join( $_links_add_base, $m[3] ) )
    29872987        . $m[2];
    29882988}
Note: See TracChangeset for help on using the changeset viewer.