Update upstream source from tag 'upstream/3.3.9'
Update to upstream version '3.3.9'
with Debian dir 6d76f0b48d004f31ee3b35117364519224488562
Dominik George
5 years ago
9 | 9 |
use Embed\Http\Url;
|
10 | 10 |
use Embed\Providers\Provider;
|
11 | 11 |
use Embed\Utils;
|
|
12 |
use Exception;
|
12 | 13 |
|
13 | 14 |
/**
|
14 | 15 |
* Base class extended by all adapters.
|
|
316 | 317 |
return $this->getFirstFromProviders(function (Provider $provider) use ($blacklist, $homeUrl) {
|
317 | 318 |
$url = $provider->getUrl();
|
318 | 319 |
|
319 | |
if ($homeUrl === $url || (!empty($blacklist) && Url::create($url)->match($blacklist))) {
|
|
320 |
try {
|
|
321 |
if ($homeUrl === $url || (!empty($blacklist) && Url::create($url)->match($blacklist))) {
|
|
322 |
return false;
|
|
323 |
}
|
|
324 |
} catch (Exception $error) {
|
320 | 325 |
return false;
|
321 | 326 |
}
|
322 | 327 |
|
27 | 27 |
'image/png' => ['photo', 'imageHtml'],
|
28 | 28 |
'image/bmp' => ['photo', 'imageHtml'],
|
29 | 29 |
'image/ico' => ['photo', 'imageHtml'],
|
|
30 |
'image/webp' => ['photo', 'imageHtml'],
|
30 | 31 |
'text/rtf' => ['rich', 'google'],
|
31 | 32 |
'application/pdf' => ['rich', 'google'],
|
32 | 33 |
'application/msword' => ['rich', 'google'],
|
539 | 539 |
foreach ((array) $query as $key => $value) {
|
540 | 540 |
$this->info['query'][hex2bin($key)] = $value;
|
541 | 541 |
}
|
542 | |
|
543 | |
array_walk_recursive($this->info['query'], function (&$value) {
|
544 | |
$value = urldecode($value);
|
545 | |
});
|
546 | 542 |
}
|
547 | 543 |
|
548 | 544 |
/**
|
|
623 | 619 |
private static function getSuffixes()
|
624 | 620 |
{
|
625 | 621 |
if (self::$public_suffix_list === null) {
|
626 | |
self::$public_suffix_list = include __DIR__.'/../resources/public_suffix_list.php';
|
627 | |
}
|
628 | |
|
|
622 |
self::$public_suffix_list = (@include __DIR__.'/../resources/public_suffix_list.php') ?: [];
|
|
623 |
}
|
|
624 |
|
629 | 625 |
return self::$public_suffix_list;
|
630 | 626 |
}
|
631 | 627 |
|
9 | 9 |
'instagram.com/p/*',
|
10 | 10 |
'www.instagram.com/p/*',
|
11 | 11 |
];
|
12 | |
protected static $endPoint = 'http://api.instagram.com/oembed';
|
|
12 |
protected static $endPoint = 'https://api.instagram.com/oembed';
|
13 | 13 |
|
14 | 14 |
/**
|
15 | 15 |
* {@inheritdoc}
|
|
0 |
<?php
|
|
1 |
|
|
2 |
namespace Embed\Providers\OEmbed;
|
|
3 |
|
|
4 |
class Poll extends Polldaddy
|
|
5 |
{
|
|
6 |
protected static $pattern = 'poll.fm/*';
|
|
7 |
}
|
4 | 4 |
class Polldaddy extends EndPoint implements EndPointInterface
|
5 | 5 |
{
|
6 | 6 |
protected static $pattern = 'polldaddy.com/poll/*';
|
7 | |
protected static $endPoint = 'http://polldaddy.com/oembed';
|
|
7 |
protected static $endPoint = 'https://api.crowdsignal.com/oembed';
|
8 | 8 |
}
|
4 | 4 |
class Soundcloud extends EndPoint implements EndPointInterface
|
5 | 5 |
{
|
6 | 6 |
protected static $pattern = 'soundcloud.com/*';
|
7 | |
protected static $endPoint = 'http://soundcloud.com/oembed';
|
|
7 |
protected static $endPoint = 'https://soundcloud.com/oembed';
|
8 | 8 |
}
|