Replace protocol-relative url by http://
This commit is contained in:
parent
81819691c1
commit
ebc835cf78
6
vendor/PicoFeed/Filter.php
vendored
6
vendor/PicoFeed/Filter.php
vendored
@ -152,15 +152,12 @@ class Filter
|
|||||||
|
|
||||||
// Iframe source whitelist, everything else is ignored
|
// Iframe source whitelist, everything else is ignored
|
||||||
public static $iframe_whitelist = array(
|
public static $iframe_whitelist = array(
|
||||||
'//www.youtube.com',
|
|
||||||
'http://www.youtube.com/',
|
'http://www.youtube.com/',
|
||||||
'https://www.youtube.com/',
|
'https://www.youtube.com/',
|
||||||
'http://player.vimeo.com/',
|
'http://player.vimeo.com/',
|
||||||
'https://player.vimeo.com/',
|
'https://player.vimeo.com/',
|
||||||
'//player.vimeo.com/',
|
|
||||||
'http://www.dailymotion.com',
|
'http://www.dailymotion.com',
|
||||||
'https://www.dailymotion.com',
|
'https://www.dailymotion.com',
|
||||||
'//www.dailymotion.com',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -240,6 +237,9 @@ class Filter
|
|||||||
$value = $attributes['data-src'];
|
$value = $attributes['data-src'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace protocol-relative url // by http://
|
||||||
|
if (substr($value, 0, 2) === '//') $value = 'http:'.$value;
|
||||||
|
|
||||||
$attr_data .= ' '.$attribute.'="'.$value.'"';
|
$attr_data .= ' '.$attribute.'="'.$value.'"';
|
||||||
$used_attributes[] = $attribute;
|
$used_attributes[] = $attribute;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user