validate_url allow naked subdomain if is "localhost"
This commit is contained in:
parent
60871555f5
commit
67a2d5be77
|
@ -587,8 +587,9 @@ function fetch_xrd_links($url) {
|
|||
|
||||
if(! function_exists('validate_url')) {
|
||||
function validate_url(&$url) {
|
||||
// no naked subdomains
|
||||
if(strpos($url,'.') === false)
|
||||
|
||||
// no naked subdomains (allow localhost for tests)
|
||||
if(strpos($url,'.') === false && strpos($url,'/localhost/') === false)
|
||||
return false;
|
||||
if(substr($url,0,4) != 'http')
|
||||
$url = 'http://' . $url;
|
||||
|
|
Loading…
Reference in a new issue