]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/OEmbed.php
Blanks replaced
[friendica.git] / src / Content / OEmbed.php
index 14e910ebab70e9c853931d4cdd7294142824f66d..dbba99fcffa5238d31c98a0d33a892ffa34eab30 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -32,6 +32,7 @@ use Friendica\Core\Renderer;
 use Friendica\Database\Database;
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Network\HTTPClient\Client\HttpClientAccept;
 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, HttpClientAccept::HTML, 15);
                                if (!empty($html_text)) {
                                        $dom = new DOMDocument();
                                        if (@$dom->loadHTML($html_text)) {