Some more "accept" parameters are added

This commit is contained in:
Michael 2022-03-29 06:24:20 +00:00
parent 173e72169b
commit 1fae0123ec
32 changed files with 111 additions and 60 deletions

View file

@ -32,6 +32,7 @@ use Friendica\Core\Renderer;
use Friendica\Database\Database;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Network\HTTPClient\Client\HttpClient;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
@ -97,7 +98,7 @@ class OEmbed
if (!in_array($ext, $noexts)) {
// try oembed autodiscovery
$html_text = DI::httpClient()->fetch($embedurl, 15, 'text/*');
$html_text = DI::httpClient()->fetch($embedurl, 15, HttpClient::ACCEPT_HTML);
if (!empty($html_text)) {
$dom = new DOMDocument();
if (@$dom->loadHTML($html_text)) {