public static function replaceCallback($matches)
{
$embedurl = $matches[1];
- $j = self::fetchURL($embedurl);
+ $j = self::fetchURL($embedurl, !self::isAllowedURL($embedurl));
$s = self::formatObject($j);
return $s;
return $j;
}
- public static function formatObject($j)
+ private static function formatObject($j)
{
$embedurl = $j->embedurl;
$jhtml = $j->html;
case "link":
break;
case "rich":
- if (self::isAllowedURL($embedurl)) {
- $ret .= proxy_parse_html($jhtml);
- }
+ $ret .= proxy_parse_html($jhtml);
break;
}
$url = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"),
array("https://www.youtube.com/", "https://player.vimeo.com/"), $url);
- $o = self::fetchURL($url);
+ $o = self::fetchURL($url, !self::isAllowedURL($url));
if (!is_object($o) || $o->type == 'error') {
throw new Exception('OEmbed failed for URL: ' . $url);