]> git.mxchange.org Git - friendica.git/commitdiff
Oembed: Some more cleanup
authorMichael <heluecht@pirati.ca>
Sun, 3 Mar 2024 17:58:20 +0000 (17:58 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 3 Mar 2024 18:06:25 +0000 (18:06 +0000)
src/Content/OEmbed.php
src/Model/Post/Media.php
src/Util/ParseUrl.php

index 9af01b76dac1df02a0a77ece82e336e0272e2a3f..5e6b16623446e4add9e495810dca965967e09d14 100644 (file)
@@ -225,7 +225,7 @@ class OEmbed
                                                '$turl' => BBCode::proxyUrl($oembed->thumbnail_url, BBCode::INTERNAL, $uriid, Proxy::SIZE_SMALL),
                                        ]);
                                } else {
-                                       $ret = $oembed->html;
+                                       $ret .= Proxy::proxifyHtml($oembed->html, $uriid);
                                }
                                break;
 
index 346a6a1d00807e1173213b8323a55fac5c818732..a22b9fba6b989173d5c8b4dd8874aceb800d0357 100644 (file)
@@ -365,7 +365,7 @@ class Media
         */
        private static function addPage(array $media): array
        {
-               $data = ParseUrl::getSiteinfoCached($media['url'], false);
+               $data = ParseUrl::getSiteinfoCached($media['url']);
                $media['preview'] = $data['images'][0]['src'] ?? null;
                $media['preview-height'] = $data['images'][0]['height'] ?? null;
                $media['preview-width'] = $data['images'][0]['width'] ?? null;
index d12d84278ba95e41753db9fa470496aeb6c563d5..093a8233d0c9c634618710f4cb96d05f21503a41 100644 (file)
@@ -23,7 +23,6 @@ namespace Friendica\Util;
 
 use DOMDocument;
 use DOMXPath;
-use Friendica\Content\OEmbed;
 use Friendica\Content\Text\HTML;
 use Friendica\Protocol\HTTP\MediaType;
 use Friendica\Core\Hook;
@@ -165,8 +164,6 @@ class ParseUrl
         * \<meta name="description" content="An awesome description"\>
         *
         * @param string $url         The url of the page which should be scraped
-        * @param bool   $do_oembed   The false option is used by the function fetch_oembed()
-        *                            to avoid endless loops
         * @param int    $count       Internal counter to avoid endless loops
         *
         * @return array which contains needed data for embedding